Keep dots in Build IDs and format Worker Deployment names `<k8s-names… #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: publish-main-image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| publish-main-image: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | |
| with: | |
| go-version-file: "go.mod" | |
| check-latest: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 | |
| with: | |
| registry: docker.io | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PAT}} | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0 | |
| with: | |
| version: v2.11.2 | |
| args: release --config .goreleaser.main.yml --snapshot --clean | |
| - name: Push snapshot images | |
| run: | | |
| docker push "temporalio/temporal-worker-controller:main-amd64" | |
| docker push "temporalio/temporal-worker-controller:main-arm64" | |
| - name: Create and push manifest for :main tag | |
| run: | | |
| docker manifest create "temporalio/temporal-worker-controller:main" "temporalio/temporal-worker-controller:main-amd64" "temporalio/temporal-worker-controller:main-arm64" | |
| docker manifest push "temporalio/temporal-worker-controller:main" |