move to gitea
This commit is contained in:
63
.gitea/workflows/build-app-image.yml
Normal file
63
.gitea/workflows/build-app-image.yml
Normal file
@@ -0,0 +1,63 @@
|
||||
name: App Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
|
||||
jobs:
|
||||
build_app_image:
|
||||
name: Build app image
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DH_REGISTRY: docker.io
|
||||
REPOSITORY: ${{ github.event.repository.name }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
install: true
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.DH_REGISTRY }}
|
||||
username: ${{ env.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Extract metadata for release Docker image
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ env.DOCKER_USERNAME }}/${{ env.REPOSITORY }}
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
|
||||
- name: Build and push release Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
target: deploy
|
||||
push: ${{ startsWith(github.ref, 'refs/tags/v') && 'true' || 'false' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64
|
64
.gitea/workflows/build-arch-images.yml
Normal file
64
.gitea/workflows/build-arch-images.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [ master ]
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths: [ docker/*, docker/scripts/* ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths: [ docker/* ]
|
||||
schedule:
|
||||
- cron: '0 5 * * 4'
|
||||
|
||||
jobs:
|
||||
|
||||
build_arch_images:
|
||||
name: Build build images
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
images:
|
||||
[
|
||||
arch,
|
||||
artix
|
||||
]
|
||||
env:
|
||||
ABSOLUTE_DH_IMAGE: docker.io/corysanin/archery
|
||||
DEPLOY: false
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: determine deployment
|
||||
if: github.ref == 'refs/heads/master' && ( github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' )
|
||||
run: echo "DEPLOY=true" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout repository
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: https://github.com/docker/setup-buildx-action@v3
|
||||
with:
|
||||
install: true
|
||||
|
||||
- name: Log in to the Docker Hub
|
||||
uses: https://github.com/docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build Docker image
|
||||
uses: https://github.com/docker/build-push-action@v6
|
||||
with:
|
||||
push: ${{ env.DEPLOY }}
|
||||
pull: true
|
||||
no-cache: true
|
||||
context: ./docker/
|
||||
file: ./docker/Dockerfile.${{ matrix.images }}
|
||||
tags: "${{ env.ABSOLUTE_DH_IMAGE }}:${{ matrix.images }}"
|
Reference in New Issue
Block a user