github.com/amnezia-vpn/amneziawg-go@v0.2.8/.github/workflows/build-if-tag.yml (about) 1 name: build-if-tag 2 3 on: 4 push: 5 tags: 6 - 'v[0-9]+.[0-9]+.[0-9]+' 7 8 env: 9 APP: amneziawg-go 10 11 jobs: 12 build: 13 runs-on: ubuntu-latest 14 name: build 15 steps: 16 - name: Checkout 17 uses: actions/checkout@v4 18 with: 19 ref: ${{ github.ref_name }} 20 21 - name: Login to Docker Hub 22 uses: docker/login-action@v3 23 with: 24 username: ${{ secrets.DOCKERHUB_USERNAME }} 25 password: ${{ secrets.DOCKERHUB_TOKEN }} 26 27 - name: Setup metadata 28 uses: docker/metadata-action@v5 29 id: metadata 30 with: 31 images: amneziavpn/${{ env.APP }} 32 tags: type=semver,pattern={{version}} 33 34 - name: Set up Docker Buildx 35 uses: docker/setup-buildx-action@v3 36 37 - name: Build 38 uses: docker/build-push-action@v5 39 with: 40 push: true 41 tags: ${{ steps.metadata.outputs.tags }}