Skip to content

fix: docker registry garbage collection #103

fix: docker registry garbage collection

fix: docker registry garbage collection #103

name: Mirror to Public Repo
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
on:
push:
branches:
- main
jobs:
public-mirror:
timeout-minutes: 2
runs-on: ubuntu-latest
if: ${{ github.repository == 'iamKunal/home-k8s-gitops' }}
steps:
- uses: actions/checkout@v4
name: Checkout the public mirror
with:
repository: iamKunal/home-k8s-gitops-mirror
token: ${{ secrets.HOME_K8S_GITOPS_MIRROR_TOKEN }}
path: mirror
- name: Move mirror to correct place
run: mv mirror ../home-k8s-gitops-mirror
- name: checkout current repo
uses: actions/checkout@v4
- name: Install rsync
run: sudo apt install -y rsync
- name: Mirror repository with custom settings
run: ./mirror.sh ../home-k8s-gitops-mirror
- name: Commit and push
working-directory: ../home-k8s-gitops-mirror
run: |
[ -z "$(git status --porcelain)" ] || \
( \
git add . && \
git -c user.name='Github Actions' -c user.email='41898282+github-actions[bot]@users.noreply.github.com' commit --author 'Kunal Gupta <assaxor@gmail.com>' -m '${{ github.event.head_commit.message }}' && \
git push \
)
- uses: sarisia/actions-status-discord@v1
if: failure()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}