Skip to content

Commit 1a7d1e7

Browse files
chore: update GitHub Actions workflow for Docker image build and push
- Add permissions for package management in the workflow. - Set up Docker Buildx for multi-platform builds. - Log in to GitHub Container Registry for image pushing. - Build and push Docker image for the client application with specified platforms and tags.
1 parent 56f5c4f commit 1a7d1e7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/artifacts.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313

1414
permissions:
1515
contents: write
16+
packages: write
1617

1718
jobs:
1819
goreleaser:
@@ -37,3 +38,22 @@ jobs:
3738
args: release --clean
3839
env:
3940
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v3
44+
45+
- name: Log in to GitHub Container Registry
46+
uses: docker/login-action@v3
47+
with:
48+
registry: ghcr.io
49+
username: ${{ github.actor }}
50+
password: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Build and push docker image
53+
uses: docker/build-push-action@v5
54+
with:
55+
context: ./client
56+
file: Dockerfile
57+
platforms: linux/amd64,linux/arm64
58+
push: true
59+
tags: ghcr.io/${{ github.repository_owner }}/rabbit-client:latest

0 commit comments

Comments
 (0)