github.com/apernet/quic-go@v0.43.1-0.20240515053213-5e9e635fd9f0/.github/workflows/build-interop-docker.yml (about) 1 name: Build interop Docker image 2 on: 3 push: 4 branches: 5 - master 6 tags: 7 - 'v*' 8 9 jobs: 10 interop: 11 runs-on: ${{ fromJSON(vars['DOCKER_RUNNER_UBUNTU'] || '"ubuntu-latest"') }} 12 steps: 13 - uses: actions/checkout@v4 14 - name: Set up QEMU 15 uses: docker/setup-qemu-action@v3 16 - name: Set up Docker Buildx 17 uses: docker/setup-buildx-action@v3 18 with: 19 platforms: linux/amd64,linux/arm64 20 - name: Login to Docker Hub 21 uses: docker/login-action@v3 22 with: 23 username: ${{ secrets.DOCKER_USERNAME }} 24 password: ${{ secrets.DOCKER_PASSWORD }} 25 - name: set tag name 26 id: tag 27 # Tagged releases won't be picked up by the interop runner automatically, 28 # but they can be useful when debugging regressions. 29 run: | 30 if [[ $GITHUB_REF == refs/tags/* ]]; then 31 echo "tag=${GITHUB_REF#refs/tags/}" | tee -a $GITHUB_OUTPUT; 32 echo "gitref=${GITHUB_REF#refs/tags/}" | tee -a $GITHUB_OUTPUT; 33 else 34 echo 'tag=latest' | tee -a $GITHUB_OUTPUT; 35 echo 'gitref=${{ github.sha }}' | tee -a $GITHUB_OUTPUT; 36 fi 37 - uses: docker/build-push-action@v5 38 with: 39 context: "{{defaultContext}}:interop" 40 platforms: linux/amd64,linux/arm64 41 push: true 42 build-args: | 43 GITREF=${{ steps.tag.outputs.gitref }} 44 tags: martenseemann/quic-go-interop:${{ steps.tag.outputs.tag }}