Files
gitea_docker/.github/workflows/build.yaml
Matheus Sampaio Queiroga c0c494802f
Some checks failed
Docker build / Check if image released (push) Successful in 2m28s
Docker build / Build main docker image (push) Has been cancelled
Update dockerfile and add tag release
Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
2025-02-19 23:11:16 -03:00

58 lines
1.6 KiB
YAML

name: Docker build
on:
push:
workflow_dispatch:
schedule:
- cron: 0 0/2 * * *
jobs:
check-release:
runs-on: ubuntu-latest
name: Check if image released
outputs:
docker_tag: ${{ steps.checker.outputs.docker_tag }}
git_hash: ${{ steps.checker.outputs.git_hash }}
skip: ${{ steps.checker.outputs.skip }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "./.github/checker/go.mod"
cache: true
- id: checker
uses: ./.github/checker
main-build:
runs-on: ubuntu-latest
name: Build main docker image
needs: [ check-release ]
if: needs.check-release.outputs.skip == '0'
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
tags: sirherobrine23.com.br/gitea/gitea:${{needs.check-release.outputs.docker_tag}}
build-args: GIT_HASH=${{needs.check-release.outputs.git_hash}}