Initial commit.
This commit is contained in:
commit
bc58782d80
3 changed files with 61 additions and 0 deletions
35
.forgejo/workflows/mirrors.yaml
Normal file
35
.forgejo/workflows/mirrors.yaml
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Based on https://code.forgejo.org/forgejo/oci-mirror/raw/branch/main/.forgejo/workflows/mirror.yml
|
||||
name: mirror
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '@daily'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'regsync.envsubst.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
if: ${{ vars.REGISTRY_USER != '' && secrets.REGISTRY_PASS != '' }}
|
||||
runs-on: docker
|
||||
container:
|
||||
image: forgejo.mixinet.net/oci/node-mixinet:latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
- name: Sync images
|
||||
run: |
|
||||
echo "Creating .regsync.yml file"
|
||||
REGISTRY="$(echo "${{ github.server_url }}" | sed -e 's%https://%%')" \
|
||||
REGISTRY_USER="${{ vars.REGISTRY_USER }}" \
|
||||
REGISTRY_PASS="${{ secrets.REGISTRY_PASS }}" \
|
||||
envsubst <regsync.envsubst.yml >.regsync.yml
|
||||
echo "Running regsync"
|
||||
regsync --config .regsync.yml once
|
||||
echo "Cleaning up"
|
||||
rm -f .regsync.yml
|
Loading…
Add table
Add a link
Reference in a new issue