@@ -11,18 +11,18 @@ jobs:
1111
1212 steps :
1313 - name : Checkout code from repo
14- uses : actions/checkout@v3
14+ uses : actions/checkout@v5
1515 with :
1616 fetch-depth : 0
1717
1818 - name : Set up Go
19- uses : actions/setup-go@v3
19+ uses : actions/setup-go@v6
2020 id : go
2121 with :
2222 go-version : ^1.24
2323
2424 - name : Run GoReleaser
25- uses : goreleaser/goreleaser-action@v3
25+ uses : goreleaser/goreleaser-action@v6
2626 with :
2727 version : latest
2828 args : release --clean
@@ -38,17 +38,17 @@ jobs:
3838
3939 steps :
4040 - name : Checkout code
41- uses : actions/checkout@v3
41+ uses : actions/checkout@v5
4242
4343 - name : Set version
4444 id : vars
45- run : echo ::set-output name= tag:: ${GITHUB_REF#refs/*/}
45+ run : echo " tag= ${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT"
4646
4747 - name : Check version
4848 run : echo "Version ${{ github.event.client_payload.new-tag }}"
4949
5050 - name : Use Node.js 20
51- uses : actions/setup-node@v3
51+ uses : actions/setup-node@v5
5252 with :
5353 node-version : 20
5454 registry-url : https://registry.npmjs.org/
5757 run : |
5858 git config --global user.name "pb33f github bot"
5959 git config --global user.email "[email protected] " 60+
6061 - name : Create .npmrc file
6162 run : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
6263 env :
@@ -79,32 +80,45 @@ jobs:
7980 contents : read
8081 steps :
8182 - name : Check out the repo
82- uses : actions/checkout@v3
83+ uses : actions/checkout@v5
84+
85+ - name : Set up QEMU
86+ uses : docker/setup-qemu-action@v3
87+
88+ - name : Set up Docker Buildx
89+ uses : docker/setup-buildx-action@v3
8390
8491 - name : Log in to Docker Hub
85- uses : docker/login-action@v2
92+ uses : docker/login-action@v3
8693 with :
8794 username : ${{ secrets.DOCKER_USERNAME }}
8895 password : ${{ secrets.DOCKER_PASSWORD }}
8996
9097 - name : Log in to the Container registry
91- uses : docker/login-action@v2
98+ uses : docker/login-action@v3
9299 with :
93100 registry : ghcr.io
94101 username : ${{ github.actor }}
95102 password : ${{ secrets.GITHUB_TOKEN }}
96103
97104 - name : Extract metadata (tags, labels) for Docker
98105 id : meta
99- uses : docker/metadata-action@v2
106+ uses : docker/metadata-action@v5
100107 with :
101108 images : |
102109 pb33f/openapi-changes
103110 ghcr.io/${{ github.repository }}
111+ tags : |
112+ type=raw,value=${{ github.event.client_payload.new-tag }}
113+ type=raw,value=latest
104114
105115 - name : Build and push Docker images
106- uses : docker/build-push-action@v4
116+ uses : docker/build-push-action@v6
107117 with :
108118 context : .
119+ platforms : linux/amd64,linux/arm64
109120 push : true
110- tags : pb33f/openapi-changes:${{ github.event.client_payload.new-tag }}, pb33f/openapi-changes:latest
121+ tags : ${{ steps.meta.outputs.tags }}
122+ labels : ${{ steps.meta.outputs.labels }}
123+ cache-from : type=gha
124+ cache-to : type=gha,mode=max
0 commit comments