Authenticate against ghcr.io

This change adds a login step that authenticates the runner to
ghcr.io. This allows whomever triggers the action to use github
packages as a destination for the container images.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2021-12-02 15:55:58 +02:00
parent 30d8dccd3d
commit c6d26f0d37
No known key found for this signature in database
GPG Key ID: 7D073DCC2C074CB5

View File

@ -143,6 +143,13 @@ jobs:
service_account_key: ${{ secrets.GCP_SA_KEY }} service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true export_default_credentials: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push images - name: Build and push images
shell: bash shell: bash
run: | run: |