Files
gitea_docker/.github/workflows/build.yaml
Matheus Sampaio Queiroga 73eaaeedb6
All checks were successful
Docker build / Check if image released (push) Successful in 1m3s
Docker build / Build main docker image (push) Has been skipped
Init support for taging gitea images
Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
2025-02-19 20:59:05 -03:00

58 lines
1.5 KiB
YAML

name: Docker build
on:
push:
workflow_dispatch:
schedule:
- cron: 0 0/6 * * *
jobs:
check-release:
runs-on: ubuntu-latest
name: Check if image released
outputs:
skip: ${{ steps.checker.outputs.skip }}
git_hash: ${{ steps.checker.outputs.git_hash }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- id: checker
uses: https://sirherobrine23.com.br/gitea/gitea_docker@main
main:
runs-on: ubuntu-latest
name: Build main docker image
needs: [ check-release ]
if: needs.check-release.outputs.skip == '1'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: sirherobrine23.com.br
password: ${{ secrets.DOCKER_TOKEN }}
username: sirherobrine23
- name: Setup qemu
uses: docker/setup-qemu-action@v3
- name: Setup buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/arm64,linux/amd64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
cache-from: sirherobrine23.com.br/gitea/gitea:latest
tags: sirherobrine23.com.br/gitea/gitea:latest
build-args: GIT_HASH=${{needs.check-release.outputs.git_hash}}