switching to github actions

This commit is contained in:
2025-10-24 04:48:50 -07:00
parent 5e33afb807
commit 4a78aabfdb

View File

@@ -9,7 +9,7 @@ on:
jobs: jobs:
build: build:
runs-on: prodesk runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -17,35 +17,34 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 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 - name: Log in to Gitea Docker Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: gitea.calahilstudios.com registry: gitea.calahilstudios.com
username: ${{ secrets.REGISTRY_USER }} username: ${{ secrets.GITEA_USER }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.GITEA_TOKEN }}
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Gitea metadata - name: Docker metadata
id: meta-gitea id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: gitea.calahilstudios.com/calahilstudios/${{ github.event.repository.name }} images: |
tags: | ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
type=ref,event=branch gitea.calahilstudios.com/${{ github.repository_owner }}/${{ github.event.repository.name }}
type=semver,pattern={{version}} ${{ secrets.DOCKERHUB_USER }}/${{ github.event.repository.name }}
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 }}
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=semver,pattern={{version}} type=semver,pattern={{version}}
@@ -53,20 +52,25 @@ jobs:
type=sha type=sha
type=raw,value=latest,enable={{is_default_branch}} type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push to Gitea - name: Docker Hub metadata
uses: docker/build-push-action@v6 id: meta-dockerhub
uses: docker/metadata-action@v5
with: with:
context: . images: ${{ secrets.DOCKERHUB_USER }}/${{ github.event.repository.name }}
file: ./Dockerfile tags: |
push: true type=ref,event=branch
tags: ${{ steps.meta-gitea.outputs.tags }} type=semver,pattern={{version}}
labels: ${{ steps.meta-gitea.outputs.labels }} 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 uses: docker/build-push-action@v6
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
push: true push: true
tags: ${{ steps.meta-dockerhub.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta-dockerhub.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max