-
Notifications
You must be signed in to change notification settings - Fork 38
52 lines (43 loc) · 1.6 KB
/
publish-main-image.yml
File metadata and controls
52 lines (43 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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"