CI: add scheduled releases + mirror workflow

* .github/workflows/release.yml:
 Add scheduled releases jobs of `$(git rev-parse --abbrev-ref HEAD)` to create
 master.zip which contains everything in the root (e.g., `./*`) of the file dir.

* .github/workflows/mirror.yml:
 Add scheduled mirroring jobs to CI.
 Mirror to all private repos via SSH.

Also move `.github/FUNDING.yml` to `workflows/` dir.

Signed-off-by: Sharp-tailed Grouse <sharptail@riseup.net>
This commit is contained in:
Sharp-tailed Grouse 2022-10-20 14:50:24 -04:00
parent c095430067
commit 5a3522c6e5
No known key found for this signature in database
GPG Key ID: 6C7408090F90B43D
3 changed files with 72 additions and 0 deletions

43
.github/workflows/mirror.yml vendored Normal file
View File

@ -0,0 +1,43 @@
name: Mirrors
# Push to all private (configured) mirrors.
on: [ push, create, delete ]
concurrency:
group: git-mirror
jobs:
gitlab:
runs-on: ubuntu-latest
steps:
- name: GitLab
uses: wearerequired/git-mirror-action@v1
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
with:
source-repo: "git@github.com:Anon-Planet/thgtoa.git"
destination-repo: "git@gitlab.com:{{ secrets.GITLAB_REPO_USERNAME }}/thgtoa.git"
codeberg:
runs-on: ubuntu-latest
steps:
- name: Codeberg
uses: wearerequired/git-mirror-action@v1
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
with:
source-repo: "git@github.com:Anon-Planet/thgtoa.git"
destination-repo: "git@codeberg.org:{{ secrets.CODEBERG_REPO_USERNAME }}/thgtoa.git"
disroot:
runs-on: ubuntu-latest
steps:
- name: Disroot
uses: wearerequired/git-mirror-action@v1
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
with:
source-repo: "git@github.com:Anon-Planet/thgtoa.git"
destination-repo: "git@git.disroot.org:{{ secrets.DISROOT_REPO_USERNAME }}/thgtoa.git"

29
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,29 @@
on:
push:
tags:
- "v*"
jobs:
upload-files:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: "THGTOA"
branch: "master"
steps:
- uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}
- name: Scheduled Release
run: |
zip -rv ${{ matrix.name }}.zip _site
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
${{ matrix.name }}.zip