thonk
This commit is contained in:
parent
0f710f2712
commit
1c3440d919
1 changed files with 7 additions and 5 deletions
12
.github/workflows/ci.yaml
vendored
12
.github/workflows/ci.yaml
vendored
|
@ -19,14 +19,16 @@ jobs:
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- run: docker buildx create --use --driver=docker-container
|
- run: docker buildx create --use --driver=docker-container
|
||||||
- run: |
|
- run: |
|
||||||
|
TAG_LATEST_IF_MASTER=$(if [ "$GITHUB_REF_NAME" = "main" ]; then echo "-t ghcr.io/${{ github.repository }}/${{ matrix.service }}:latest"; else echo ""; fi)
|
||||||
docker buildx build . \
|
docker buildx build . \
|
||||||
--build-arg SERVICE=${{ matrix.service }} \
|
--build-arg SERVICE=${{ matrix.service }} \
|
||||||
-t ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \
|
-t ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} $TAG_LATEST_IF_MASTER \
|
||||||
|
--push \
|
||||||
--cache-to type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} \
|
--cache-to type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} \
|
||||||
--cache-from type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }}
|
--cache-from type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }}
|
||||||
- run: |
|
# - run: |
|
||||||
docker tag ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \
|
# docker tag ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \
|
||||||
ghcr.io/${{ github.repository }}/${{ matrix.service }}:latest
|
# ghcr.io/${{ github.repository }}/${{ matrix.service }}:latest
|
||||||
if: github.ref == 'refs/heads/main'
|
# if: github.ref == 'refs/heads/main'
|
||||||
- run: |
|
- run: |
|
||||||
docker push ghcr.io/${{ github.repository }}/${{ matrix.service }}
|
docker push ghcr.io/${{ github.repository }}/${{ matrix.service }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue