mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
ci: Use PATs for github registry
https://stackoverflow.com/questions/76821352/how-can-you-authenticate-to-the-github-container-registry-using-a-github-app thx github
This commit is contained in:
@@ -44,8 +44,8 @@ creds:
|
|||||||
user: "{{env \"N7574_GIT_USERNAME\"}}"
|
user: "{{env \"N7574_GIT_USERNAME\"}}"
|
||||||
pass: "{{env \"N7574_GIT_TOKEN\"}}"
|
pass: "{{env \"N7574_GIT_TOKEN\"}}"
|
||||||
- registry: ghcr.io
|
- registry: ghcr.io
|
||||||
user: "{{env \"GITHUB_USERNAME\"}}"
|
user: "{{env \"GH_PACKAGES_USER\"}}"
|
||||||
pass: "{{env \"GITHUB_TOKEN\"}}"
|
pass: "{{env \"GH_PACKAGES_TOKEN\"}}"
|
||||||
|
|
||||||
# Global defaults
|
# Global defaults
|
||||||
defaults:
|
defaults:
|
||||||
|
|||||||
@@ -26,20 +26,22 @@ jobs:
|
|||||||
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
|
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
|
||||||
N7574_GIT_USERNAME: ${{ vars.N7574_GIT_USERNAME }}
|
N7574_GIT_USERNAME: ${{ vars.N7574_GIT_USERNAME }}
|
||||||
N7574_GIT_TOKEN: ${{ secrets.N7574_GIT_TOKEN }}
|
N7574_GIT_TOKEN: ${{ secrets.N7574_GIT_TOKEN }}
|
||||||
|
GH_PACKAGES_USER: ${{ vars.GH_PACKAGES_USER }}
|
||||||
|
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- uses: https://github.com/actions/create-github-app-token@v2
|
# - uses: https://github.com/actions/create-github-app-token@v2
|
||||||
id: app-token
|
# id: app-token
|
||||||
with:
|
# with:
|
||||||
app-id: ${{ vars.GH_APP_ID }}
|
# app-id: ${{ vars.GH_APP_ID }}
|
||||||
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
# private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
||||||
github-api-url: https://api.github.com
|
# github-api-url: https://api.github.com
|
||||||
owner: continuwuity
|
# owner: continuwuity
|
||||||
repositories: continuwuity
|
# repositories: continuwuity
|
||||||
|
|
||||||
- name: Install regctl
|
- name: Install regctl
|
||||||
uses: https://forgejo.ellis.link/continuwuation/regclient-actions/regctl-installer@main
|
uses: https://forgejo.ellis.link/continuwuation/regclient-actions/regctl-installer@main
|
||||||
@@ -53,10 +55,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Mirror images
|
- name: Mirror images
|
||||||
if: ${{ !inputs.dry_run }}
|
if: ${{ !inputs.dry_run }}
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
||||||
GH_USERNAME: ${{ vars.GH_APP_ID }}
|
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
echo "Starting image mirroring..."
|
echo "Starting image mirroring..."
|
||||||
regsync once -c .forgejo/regsync/regsync.yml -v info
|
regsync once -c .forgejo/regsync/regsync.yml -v info
|
||||||
|
|||||||
Reference in New Issue
Block a user