From 4a78aabfdb9d52a116979e536d05d2efda22e9a9 Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Fri, 24 Oct 2025 04:48:50 -0700 Subject: [PATCH] switching to github actions --- {.gitea => .github}/workflows/build.yml | 60 +++++++++++++------------ 1 file changed, 32 insertions(+), 28 deletions(-) rename {.gitea => .github}/workflows/build.yml (55%) diff --git a/.gitea/workflows/build.yml b/.github/workflows/build.yml similarity index 55% rename from .gitea/workflows/build.yml rename to .github/workflows/build.yml index 8049806..2b910c8 100644 --- a/.gitea/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: prodesk + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 @@ -17,35 +17,34 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Log in to Gitea Docker Registry uses: docker/login-action@v3 with: registry: gitea.calahilstudios.com - username: ${{ secrets.REGISTRY_USER }} - password: ${{ secrets.REGISTRY_TOKEN }} + username: ${{ secrets.GITEA_USER }} + password: ${{ secrets.GITEA_TOKEN }} - name: Log in to Docker Hub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} + username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Gitea metadata - id: meta-gitea + - name: Docker metadata + id: meta uses: docker/metadata-action@v5 with: - images: gitea.calahilstudios.com/calahilstudios/${{ github.event.repository.name }} - tags: | - type=ref,event=branch - type=semver,pattern={{version}} - type=sha - type=raw,value=latest,enable={{is_default_branch}} - - - name: Docker Hub metadata - id: meta-dockerhub - uses: docker/metadata-action@v5 - with: - images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} + images: | + ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }} + gitea.calahilstudios.com/${{ github.repository_owner }}/${{ github.event.repository.name }} + ${{ secrets.DOCKERHUB_USER }}/${{ github.event.repository.name }} tags: | type=ref,event=branch type=semver,pattern={{version}} @@ -53,20 +52,25 @@ jobs: type=sha type=raw,value=latest,enable={{is_default_branch}} - - name: Build and push to Gitea - uses: docker/build-push-action@v6 + - name: Docker Hub metadata + id: meta-dockerhub + uses: docker/metadata-action@v5 with: - context: . - file: ./Dockerfile - push: true - tags: ${{ steps.meta-gitea.outputs.tags }} - labels: ${{ steps.meta-gitea.outputs.labels }} + images: ${{ secrets.DOCKERHUB_USER }}/${{ github.event.repository.name }} + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=sha + type=raw,value=latest,enable={{is_default_branch}} - - name: Build and push to Docker Hub + - name: Build and push uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta-dockerhub.outputs.tags }} - labels: ${{ steps.meta-dockerhub.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max