Add example for ghcr.io

This commit is contained in:
Pau Rodriguez-Estivill
2022-03-04 15:50:46 +01:00
parent e55801813e
commit d893605ecf
+31
View File
@@ -158,3 +158,34 @@ jobs:
REGISTRY_PREFIX: ${{ secrets.DOCKERHUB_USERNAME }}/
BUILD_REVISION: ${{ steps.vars.outputs.sha_short }}
run: docker buildx bake --push
## Example of publish using GitHub Container Registry instead
# publish:
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
# needs: [ test-script ]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
#
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
#
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
#
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Build images
# env:
# REGISTRY_PREFIX: ghcr.io/${{ github.repository_owner }}/
# run: docker buildx bake --pull
#
# - name: Push images
# env:
# REGISTRY_PREFIX: ghcr.io/${{ github.repository_owner }}/
# run: docker buildx bake --push