From 12216a3a05ce03381d3344c35ffcf4ec2327d60b Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Sun, 14 Jun 2026 18:37:27 -0400 Subject: [PATCH] adding Gitea workflows to sync to GitHub and push to Docker Hub --- .gitea/workflows/develop.yaml | 34 ++++++++++++++++++++++++++++++++ .gitea/workflows/docker.yaml | 35 +++++++++++++++++++++++++++++++++ .gitea/workflows/publish.yaml | 37 +++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 .gitea/workflows/develop.yaml create mode 100644 .gitea/workflows/docker.yaml create mode 100644 .gitea/workflows/publish.yaml diff --git a/.gitea/workflows/develop.yaml b/.gitea/workflows/develop.yaml new file mode 100644 index 00000000..dc72f100 --- /dev/null +++ b/.gitea/workflows/develop.yaml @@ -0,0 +1,34 @@ +name: Push Docker + +on: + push: + branches: + - 'main' + - 'develop' + +jobs: + docker: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build image + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: | + ${{ vars.DOCKERHUB_TARGET }}:develop + diff --git a/.gitea/workflows/docker.yaml b/.gitea/workflows/docker.yaml new file mode 100644 index 00000000..82de495d --- /dev/null +++ b/.gitea/workflows/docker.yaml @@ -0,0 +1,35 @@ +name: Push Docker + +on: + push: + tags: + - '[0-9.]+-[0-9]+-[0-9]+' + # for this project, we do "YYYY-MM-DD" for version numbers, due to unversioned upstream + +jobs: + docker: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build image + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: | + ${{ vars.DOCKERHUB_TARGET }}:latest + ${{ vars.DOCKERHUB_TARGET }}:${{ github.ref_name }} + diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml new file mode 100644 index 00000000..eba581a4 --- /dev/null +++ b/.gitea/workflows/publish.yaml @@ -0,0 +1,37 @@ +name: Sync GitHub + +on: + push: + branches: + - '**' + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config --global user.name "Andrew Sync" + git config --global user.email "sync@digitaladapt.com" + + - name: Add GitHub Remote + env: + SYNC_TOKEN: ${{ secrets.SYNC_GITHUB_TOKEN }} + SYNC_TARGET: ${{ vars.SYNC_GITHUB_TARGET }} + run: | + git remote add github "https://digitaladapt:${SYNC_TOKEN}@github.com/$SYNC_TARGET" + + - name: Push Current Branch + run: | + git push github HEAD:${GITHUB_REF_NAME} + + - name: Push Tags + run: | + git push github --tags +