feat: Build ARM compatible docker image
This commit is contained in:
1 file changed
+21
-7
@@ -35,16 +35,30 @@ jobs:
|
|||||||
if: needs.release.outputs.new-release-published == 'true'
|
if: needs.release.outputs.new-release-published == 'true'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: docker/metadata-action@v5
|
||||||
|
name: Docker meta
|
||||||
|
id: meta
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
ghcr.io/${{ github.repository }}
|
||||||
|
tags: |
|
||||||
|
type=semver,pattern={{major}}.{{minor}}.{{patch}}
|
||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
- uses: docker/login-action@v3
|
- uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Build and push Docker image
|
- name: Build and push
|
||||||
run: |
|
id: docker-build
|
||||||
docker build --build-arg BUILD_VERSION=${{ needs.release.outputs.new-release-version }} VERSION=${{ needs.release.outputs.new-release-version }} \
|
uses: docker/build-push-action@v6
|
||||||
-t ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }} \
|
with:
|
||||||
-t ghcr.io/${{ github.repository }}:latest .
|
context: .
|
||||||
docker push ghcr.io/${{ github.repository }}:latest
|
platforms: linux/amd64,linux/arm64
|
||||||
docker push ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }}
|
push: true
|
||||||
|
build-args:
|
||||||
|
- BUILD_VERSION=${{ needs.release.outputs.new-release-version }}
|
||||||
|
- VERSION=${{ needs.release.outputs.new-release-version }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
Reference in new issue
Block a user