Skip to content

added gh action for pushing docker to gcr and ghcr #1

added gh action for pushing docker to gcr and ghcr

added gh action for pushing docker to gcr and ghcr #1

name: Push to GCR/GHCR GitHub Action
on: push
jobs:
build-and-push-to-gcr-service-account:
name: Build & push to GCR/GHCR
if: startsWith(github.ref, 'refs/tags/') # only publish to registry on tag pushes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.B64_GCLOUD_SERVICE_ACCOUNT_JSON }}'
- name: Building and pushing the image
uses: ./
run: |
docker login ghcr.io -u abaumann -p ${github_token}
./docker/vm_boot_images/build.sh -P
./docker/vm_boot_images/build.sh -c -P
with:
github_token: ${{ secrets.GHCR_TOKEN }}