File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed
Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change 2121 PLATFORMS : linux/amd64,linux/arm64,linux/arm/v7
2222
2323jobs :
24- build-and-push-image :
25- runs-on : ubuntu-latest
24+ build_and_push_image :
25+ name : Build and push Docker image
26+ runs-on : ubuntu-22.04
2627 permissions :
2728 contents : read
2829 packages : write
@@ -50,11 +51,31 @@ jobs:
5051 with :
5152 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5253
53- - name : Build and push Docker image
54+ - name : Build and push image to GHCR
5455 uses : docker/build-push-action@v3
5556 with :
5657 context : .
5758 push : true
5859 platforms : ${{ env.PLATFORMS }}
5960 tags : ${{ steps.meta.outputs.tags }}
6061 labels : ${{ steps.meta.outputs.labels }}
62+
63+ - name : Log in to Docker Hub
64+ uses : docker/login-action@v2
65+ with :
66+ username : ${{ secrets.DOCKER_USERNAME }}
67+ password : ${{ secrets.DOCKER_PASSWORD }}
68+
69+ - name : Extract metadata (tags, labels) for Docker
70+ id : meta
71+ uses : docker/metadata-action@v4
72+ with :
73+ images : ajustesen/${{ env.IMAGE_NAME }}
74+
75+ - name : Build and push image to Docker Hub
76+ uses : docker/build-push-action@v3
77+ with :
78+ context : .
79+ push : true
80+ tags : ${{ steps.meta.outputs.tags }}
81+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments