ci: Mirror to ghcr
This commit is contained in:
parent
37c537379d
commit
3214e94cdb
2 changed files with 17 additions and 0 deletions
|
|
@ -43,6 +43,9 @@ creds:
|
|||
- registry: git.nexy7574.co.uk
|
||||
user: "{{env \"N7574_GIT_USERNAME\"}}"
|
||||
pass: "{{env \"N7574_GIT_TOKEN\"}}"
|
||||
- registry: ghcr.io
|
||||
user: "{{env \"GITHUB_USERNAME\"}}"
|
||||
pass: "{{env \"GITHUB_TOKEN\"}}"
|
||||
|
||||
# Global defaults
|
||||
defaults:
|
||||
|
|
@ -58,5 +61,6 @@ sync:
|
|||
<<: *tags-main
|
||||
- source: *source
|
||||
target: git.nexy7574.co.uk/mirrored/continuwuity
|
||||
target: ghcr.io/continuwuity/continuwuity
|
||||
type: repository
|
||||
<<: *tags-main
|
||||
|
|
|
|||
|
|
@ -32,6 +32,15 @@ jobs:
|
|||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: https://github.com/actions/create-github-app-token@v2
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.GH_APP_ID }}
|
||||
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
||||
github-api-url: https://api.github.com
|
||||
owner: continuwuity
|
||||
repositories: continuwuity
|
||||
|
||||
- name: Install regctl
|
||||
uses: https://forgejo.ellis.link/continuwuation/regclient-actions/regctl-installer@main
|
||||
with:
|
||||
|
|
@ -44,6 +53,10 @@ jobs:
|
|||
|
||||
- name: Mirror images
|
||||
if: ${{ !inputs.dry_run }}
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
GH_USERNAME: ${{ vars.GH_APP_ID }}
|
||||
|
||||
run: |
|
||||
echo "Starting image mirroring..."
|
||||
regsync once -c .forgejo/regsync/regsync.yml -v info
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue