dbx/.github/workflows/sync-to-cnb.yml

35 lines
678 B
YAML

name: Sync to CNB
on:
push:
branches:
- main
tags:
- "**"
delete:
workflow_dispatch:
env:
CNB_REPOSITORY: "dbxio.com/dbx"
CNB_USERNAME: "cnb"
jobs:
sync:
name: Sync repository to CNB
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to CNB mirror
env:
CNB_TOKEN: ${{ secrets.CNB_TOKEN }}
run: |
set -euo pipefail
git remote add cnb "https://${CNB_USERNAME}:${CNB_TOKEN}@cnb.cool/${CNB_REPOSITORY}.git"
git push cnb --all --force
git push cnb --tags --force