mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-07-01 19:26:53 +02:00
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
name: Push Smoke Build
|
|
|
|
on:
|
|
push:
|
|
branches: [dev, main]
|
|
|
|
jobs:
|
|
smoke_build:
|
|
name: Project smoke build (linux-amd64)
|
|
runs-on: linux-amd64
|
|
if: ${{ !contains(github.event.head_commit.message, '[nobuild]') }}
|
|
steps:
|
|
- name: Checkout repository
|
|
shell: bash
|
|
env:
|
|
CI_MATCHA_GITEA_TOKEN: ${{ secrets.CI_MATCHA_GITEA_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
if [ -z "${CI_MATCHA_GITEA_TOKEN:-}" ]; then
|
|
echo "Missing secrets.CI_MATCHA_GITEA_TOKEN" >&2
|
|
exit 1
|
|
fi
|
|
basic=$(python3 -c 'import base64, os; print(base64.b64encode(("matcha:" + os.environ["CI_MATCHA_GITEA_TOKEN"]).encode()).decode())')
|
|
git init .
|
|
git remote add origin "https://git.hiabuto.net/${{ github.repository }}.git"
|
|
git config --global http.https://git.hiabuto.net/.extraheader "AUTHORIZATION: basic ${basic}"
|
|
git fetch --depth=1 origin "${{ github.ref_name }}"
|
|
git checkout --force FETCH_HEAD
|
|
|
|
- name: Load central CI templates
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
git submodule sync --recursive
|
|
git submodule update --init --remote ci-templates
|
|
git -C ci-templates rev-parse --short HEAD
|
|
|
|
- name: Run config-driven smoke build
|
|
uses: ./ci-templates/actions/ci-runner
|
|
with:
|
|
command: smoke-build
|
|
config: ci-config.yaml
|