kv-download/.forgejo/workflows/docker.yml
vndangkhoa cedf20b81d
Some checks failed
/ build (push) Failing after 2m43s
fix forgejo actions: use gitea.com action URLs and fix sha syntax
2026-04-04 17:38:47 +07:00

52 lines
1.5 KiB
YAML

on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: https://gitea.com/actions/checkout@v4
- name: Set up QEMU
uses: https://gitea.com/docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
uses: https://gitea.com/docker/setup-buildx-action@v3
- name: Login to Docker Registry
if: github.event_name != 'pull_request'
uses: https://gitea.com/docker/login-action@v3
with:
registry: git.khoavo.myds.me
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker image
if: github.event_name != 'pull_request'
uses: https://gitea.com/docker/build-push-action@v6
with:
context: .
push: true
tags: |
git.khoavo.myds.me/vndangkhoa/kv-download:latest
git.khoavo.myds.me/vndangkhoa/kv-download:${{ github.sha }}
platforms: linux/amd64,linux/arm64
- name: Build Docker image (PR only)
if: github.event_name == 'pull_request'
uses: https://gitea.com/docker/build-push-action@v6
with:
context: .
push: false
tags: kv-download:latest
platforms: linux/amd64,linux/arm64