diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 292b23fb9608..f0b32da166d4 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -132,47 +132,47 @@ jobs: IMAGE_PULL_POLICY: IfNotPresent run: make e2e - # publish: - # runs-on: ubuntu-latest - # needs: [conformance-test, e2e-test] - # steps: - # - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # - uses: ./tools/github-actions/setup-deps - - # - name: Download EG Binaries - # uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - # with: - # name: envoy-gateway - # path: bin/ - - # - name: Give Privileges To EG Binaries - # run: | - # chmod +x bin/linux/amd64/envoy-gateway - # chmod +x bin/linux/arm64/envoy-gateway - - # # build and push image - # - name: Login to DockerHub - # if: github.event_name == 'push' - # uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 - # with: - # username: ${{ secrets.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_PASSWORD }} - - # - name: Setup Multiarch Environment - # if: github.event_name == 'push' - # run: make image.multiarch.setup - - # - name: Build and Push EG Commit Image - # if: github.event_name == 'push' - # # tag is set to the short SHA of the commit - # run: make image.push.multiarch PLATFORMS="linux_amd64 linux_arm64" IMAGE=envoyproxy/gateway-dev - - # - name: Build and Push EG Latest Image - # if: github.event_name == 'push' && github.ref == 'refs/heads/main' - # # tag is set to `latest` when pushing to main branch - # run: make image.push.multiarch TAG=latest PLATFORMS="linux_amd64 linux_arm64" IMAGE=envoyproxy/gateway-dev - - # - name: Build and Push EG Latest Helm Chart - # if: github.event_name == 'push' && github.ref == 'refs/heads/main' - # # use `0.0.0` as the default latest version. - # run: OCI_REGISTRY=oci://docker.io/envoyproxy CHART_VERSION=v0.0.0-latest TAG=latest make helm-package helm-push + publish: + runs-on: ubuntu-latest + needs: [conformance-test, e2e-test] + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: ./tools/github-actions/setup-deps + + - name: Download EG Binaries + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + with: + name: envoy-gateway + path: bin/ + + - name: Give Privileges To EG Binaries + run: | + chmod +x bin/linux/amd64/envoy-gateway + chmod +x bin/linux/arm64/envoy-gateway + + # build and push image + - name: Login to DockerHub + if: github.event_name == 'push' + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Setup Multiarch Environment + if: github.event_name == 'push' + run: make image.multiarch.setup + + - name: Build and Push EG Commit Image + if: github.event_name == 'push' + # tag is set to the short SHA of the commit + run: make image.push.multiarch PLATFORMS="linux_amd64 linux_arm64" IMAGE=dcard/envoy-gateway + + - name: Build and Push EG Latest Image + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + # tag is set to `latest` when pushing to main branch + run: make image.push.multiarch TAG=latest PLATFORMS="linux_amd64 linux_arm64" IMAGE=dcard/envoy-gateway + + # - name: Build and Push EG Latest Helm Chart + # if: github.event_name == 'push' && github.ref == 'refs/heads/main' + # # use `0.0.0` as the default latest version. + # run: OCI_REGISTRY=oci://docker.io/envoyproxy CHART_VERSION=v0.0.0-latest TAG=latest make helm-package helm-push