http3-ytproxy/.forgejo/workflows/ci.yml
Fijxu f66aa3efa6
All checks were successful
CI / build (push) Successful in 1m38s
ci: update go build path on Dockerfile and update CI file
2025-02-20 02:12:42 -03:00

52 lines
1.4 KiB
YAML

name: "CI"
on:
workflow_dispatch:
push:
branches: ["main", "master"]
jobs:
build:
runs-on: runner
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Docker BuildX system
uses: docker/setup-buildx-action@v3
- name: Login to Docker Container Registry (git.nadeko.net)
uses: docker/login-action@v3
with:
registry: git.nadeko.net
username: ${{ secrets.USERNAME }}
password: ${{ secrets.TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: git.nadeko.net/fijxu/http3-ytproxy
tags: |
type=sha,format=short,prefix={{date 'YYYY.MM.DD'}}-,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Go Build Cache for Docker
uses: actions/cache@v4
with:
path: go-build-cache
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}
- name: Inject go-build-cache
uses: https://github.com/reproducible-containers/buildkit-cache-dance@v3
with:
cache-source: go-build-cache
- name: Build and push Docker
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}