28 lines
1.0 KiB
YAML
28 lines
1.0 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches-ignore: [main]
|
|
|
|
jobs:
|
|
full-gate:
|
|
runs-on: docker-host
|
|
steps:
|
|
- uses: actions/checkout@v4.2.2
|
|
with:
|
|
fetch-depth: 0 # ci.sh's docs-only check needs history; checkout defaults to depth 1
|
|
- run: bash ci.sh
|
|
# Runs even when ci.sh no-ops on a docs-only branch: release.yml re-tags this exact image, and
|
|
# ff-only merges make every branch head a main commit - one without an image is unreleasable.
|
|
- name: Push app image tagged with the commit hash
|
|
env:
|
|
IMAGE: gitea.larvit.se/${{ github.repository }}:${{ github.sha }}
|
|
REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
|
|
REGISTRY_USER: ${{ vars.DOCKER_REGISTRY_USER }}
|
|
run: |
|
|
printf '%s' "$REGISTRY_TOKEN" | docker login gitea.larvit.se -u "$REGISTRY_USER" --password-stdin
|
|
docker build -t "$IMAGE" .
|
|
docker push "$IMAGE"
|
|
- name: Log out of the registry
|
|
if: always()
|
|
run: docker logout gitea.larvit.se
|