Files
gitea/.github/workflows/workflow.yml
T
Alek Kim a537821976
/ build (push) Failing after 42s
cicd: fix GITEA_TOKEN
2026-07-13 12:51:09 +09:00

61 lines
1.4 KiB
YAML

on:
push:
tags:
- '*.*.*'
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Docker Meta Action
uses: docker/metadata-action@v6
id: meta
with:
images: ${{ gitea.server_url }}/${{ gitea.repository }}
tags: |
type=ref,event=tag
type=sha,format=short
- name: Log in to Gitea Container Registry
uses: docker/login-action@v4
with:
registry: ${{ gitea.server_url }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Build Docker image
uses: docker/build-push-action@v7
with:
context: .
load: true
tags: ${{ steps.meta.outputs.tags }}
build-args:
GITEA_VERSION=${{ gitea.ref_name }}
- name: Test Docker image
run: |
docker run --rm ${{ steps.meta.outputs.tags }} gitea --version
- name: Push Docker image
uses: docker/build-push-action@v7
with:
context: .
platforms: liniux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}