Push packages to GHCR (#1004)

Ref #849
Ref #566

Co-authored-by: Pål Sollie <sollie@sparkz.no>
This commit is contained in:
Yusuke Kuoka
2021-12-12 11:41:33 +09:00
committed by GitHub
parent ea2dbc2807
commit 2bd6d6342e
2 changed files with 19 additions and 0 deletions

View File

@@ -7,6 +7,12 @@ inputs:
password:
description: "Password"
required: true
ghcr_username:
description: "GHCR username. Usually set from the github.actor variable"
required: true
ghcr_password:
description: "GHCR password. Usually set from the secrets.GITHUB_TOKEN variable"
required: true
outputs:
sha_short:
@@ -36,3 +42,11 @@ runs:
with:
username: ${{ inputs.username }}
password: ${{ inputs.password }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
if: ${{ github.ref == 'master' && github.event.pull_request.merged == true }}
with:
registry: ghcr.io
username: ${{ inputs.ghcr_username }}
password: ${{ inputs.ghcr_password }}