Files
git-pages/.forgejo/workflows/ci.yaml
2025-10-22 05:24:55 +00:00

57 lines
1.6 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
check:
runs-on: codeberg-small-lazy
container:
image: docker.io/library/node:24-trixie-slim
steps:
- name: Check out source code
uses: https://code.forgejo.org/actions/checkout@v5
- name: Set up toolchain
uses: https://code.forgejo.org/actions/setup-go@v6
with:
go-version: '>=1.25.0'
- name: Install dependencies
run: |
apt-get -y update
apt-get -y install ca-certificates
- name: Build service
run: |
go build -o bin/git-pages .
- name: Run static analysis
run: |
go vet .
package:
needs: [check]
runs-on: codeberg-small-lazy
container:
image: docker.io/library/node:24-trixie-slim
steps:
- name: Install dependencies
run: |
apt-get -y update
apt-get -y install buildah ca-certificates
- name: Check out source code
uses: https://code.forgejo.org/actions/checkout@v5
- if: ${{ forge.repository == 'git-pages/git-pages' && 'true' || 'false' }}
name: Log into container registry
run: |
buildah login --authfile=/tmp/authfile.json \
-u git-pages-bot -p ${{ secrets.PACKAGES_TOKEN }} codeberg.org
- name: Build container
uses: https://codeberg.org/actions/buildah-simple@main
with:
context: .
tag: "codeberg.org/git-pages/git-pages:latest"
push: ${{ forge.repository == 'git-pages/git-pages' && 'true' || 'false' }}
authfile: /tmp/authfile.json