From 4595cf55f28469043ef8fa72690f6c04190ef935 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 15 Jun 2024 13:18:30 +0200 Subject: [PATCH] Add reusable workflows Signed-off-by: Steffen Vogel --- .github/workflows/mirror.yaml | 30 ++++++++++++++++++++++++++++++ .github/workflows/reuse.yaml | 19 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/mirror.yaml create mode 100644 .github/workflows/reuse.yaml diff --git a/.github/workflows/mirror.yaml b/.github/workflows/mirror.yaml new file mode 100644 index 0000000..b6358d9 --- /dev/null +++ b/.github/workflows/mirror.yaml @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: 2023-2024 Steffen Vogel +# SPDX-License-Identifier: Apache-2.0 + +# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json +--- +name: Mirror to Codeberg + +on: + workflow_call: + secrets: + CODEBERG_SSH_KEY: + required: true + +jobs: + mirror: + name: Mirror + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: yesolutions/mirror-action@master + with: + REMOTE: git@codeberg.org:${{ github.repository }}.git + GIT_SSH_PRIVATE_KEY: ${{ secrets.CODEBERG_SSH_KEY }} + GIT_SSH_NO_VERIFY_HOST: "true" + diff --git a/.github/workflows/reuse.yaml b/.github/workflows/reuse.yaml new file mode 100644 index 0000000..222a75d --- /dev/null +++ b/.github/workflows/reuse.yaml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. +# SPDX-License-Identifier: CC0-1.0 + +# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json +--- +name: Compliance Checks + +on: + workflow_call: + +jobs: + test: + name: REUSE + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v3 \ No newline at end of file