Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Weekly, grouped updates; the cooldown leaves a new release a week to be
# pulled if it is compromised. Commits need the maintainer's sign-off before
# merge, like any other (git rebase --signoff).
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
cooldown:
default-days: 7
groups:
actions:
patterns: ["*"]
commit-message:
prefix: ci
28 changes: 0 additions & 28 deletions .github/scripts/base-commit.sh

This file was deleted.

41 changes: 0 additions & 41 deletions .github/scripts/commit-check.sh

This file was deleted.

69 changes: 0 additions & 69 deletions .github/scripts/test-commit-check.sh

This file was deleted.

55 changes: 38 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Lint, test, check the docs, and check commit trailers on pushes to main and
# on pull requests. Mirrors upstream's .gitlab-ci.yml test stage: the jobs run
# Lint, test, check the docs, and check commits on pushes to main, pull
# requests and merge groups, and weekly against the moving alpine:latest image
# upstream's CI uses too. Mirrors upstream's .gitlab-ci.yml test stage: the jobs run
# the same .ci/*.sh scripts, as root in an Alpine container that drops to a
# "build" user, exactly as they do on GitLab.
#
Expand All @@ -12,19 +13,27 @@ on:
push:
branches: [main]
pull_request:
merge_group:
schedule:
- cron: "53 4 * * 1"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# Superseded pull request runs are cancelled; every push to main keeps its result.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
container: docker.io/library/alpine:latest
timeout-minutes: 15
# Unpinned like upstream's image: the weekly run catches what a new
# Alpine release breaks.
container: docker.io/library/alpine:latest # zizmor: ignore[unpinned-images]
steps:
- name: Prepare the container
run: |
Expand Down Expand Up @@ -58,7 +67,8 @@ jobs:
docs:
name: Docs
runs-on: ubuntu-24.04
container: docker.io/library/alpine:latest
timeout-minutes: 15
container: docker.io/library/alpine:latest # zizmor: ignore[unpinned-images]
steps:
- name: Prepare the container
run: |
Expand All @@ -75,9 +85,10 @@ jobs:
test:
name: Test
runs-on: ubuntu-24.04
timeout-minutes: 30
# Privileged, like the GitLab runners: the chroot tests mount tmpfs.
container:
image: docker.io/library/alpine:latest
image: docker.io/library/alpine:latest # zizmor: ignore[unpinned-images]
options: --privileged
steps:
- name: Prepare the container
Expand All @@ -98,17 +109,27 @@ jobs:
commit-check:
name: Commit check
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: porthole-dev/.github/actions/commit-check@06b66d018629f11ebf2e305940855793dbc0b775 # v1.0.0

workflow-lint:
name: Workflow lint
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 100
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- name: Test the check
run: sh .github/scripts/test-commit-check.sh
- name: Check trailers and DCO sign-off
run: |
base=$(sh .github/scripts/base-commit.sh)
if [ -z "$base" ]; then echo "no new commits"; exit 0; fi
sh .github/scripts/commit-check.sh "$base" HEAD \
${{ github.event_name == 'pull_request' && '--dco' || '' }}
- uses: porthole-dev/.github/actions/workflow-lint@06b66d018629f11ebf2e305940855793dbc0b775 # v1.0.0

ci-passed:
name: CI passed
if: ${{ !cancelled() }}
needs: [lint, docs, test, commit-check, workflow-lint]
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: porthole-dev/.github/actions/ci-passed@06b66d018629f11ebf2e305940855793dbc0b775 # v1.0.0
with:
results: ${{ join(needs.*.result, ' ') }}