This commit is contained in:
1 parent
f0d8e4a167
commit
16f86ad0b3
1 file changed
+15
-6
@@ -17,16 +17,25 @@ jobs:
|
||||
run: |
|
||||
echo "IMAGE=git.dou.bet/iamdoubz/drawit" >> $GITHUB_ENV
|
||||
echo "TAG=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
||||
echo "CACHE_IMAGE=git.dou.bet/iamdoubz/drawit:buildcache" >> $GITHUB_ENV
|
||||
|
||||
- name: Login to registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.dou.bet -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build -t $IMAGE:$TAG -t $IMAGE:latest .
|
||||
- name: Install QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Push image
|
||||
- name: Install Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push multi-arch image
|
||||
run: |
|
||||
docker push $IMAGE:$TAG
|
||||
docker push $IMAGE:latest
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--tag $IMAGE:$TAG \
|
||||
--tag $IMAGE:latest \
|
||||
--cache-from type=registry,ref=$CACHE_IMAGE \
|
||||
--cache-to type=registry,ref=$CACHE_IMAGE,mode=max \
|
||||
--push \
|
||||
.
|
||||
Reference in new issue
Block a user