From 4819d36f8e02fbfcf035e61ef9a9cf19588881b3 Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Wed, 31 Dec 2025 18:52:31 +0100 Subject: [PATCH] added github workflow --- .gitea/workflows/push-to-github.yaml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .gitea/workflows/push-to-github.yaml diff --git a/.gitea/workflows/push-to-github.yaml b/.gitea/workflows/push-to-github.yaml new file mode 100644 index 0000000..473fc13 --- /dev/null +++ b/.gitea/workflows/push-to-github.yaml @@ -0,0 +1,36 @@ +--- +name: Push to GitHub +concurrency: + group: push-to-github + cancel-in-progress: false + +on: + push: + branches: ["**"] + +defaults: + run: + shell: bash + +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: | + git config --global user.name "${GITHUB_NAME}" + git config --global user.email "${GITHUB_EMAIL}" + git config --global credential.helper store + printf "https://${GITHUB_EMAIL//@/%40}:${GITHUB_TOKEN}@github.com" > ~/.git-credentials + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_NAME: ${{ secrets.GITHUB_NAME }} + GITHUB_EMAIL: ${{ secrets.GITHUB_EMAIL }} + + - run: | + git remote add github "${GITHUB_REPO_URL}" || git remote set-url github "${GITHUB_REPO_URL}" + git push github --all + git push github --tags + env: + GITHUB_REPO_URL: ${{ secrets.GITHUB_REPO_URL }}