Compare commits

..
139 Commits
Author SHA1 Message Date
wayfinderak 5ae775f1be Tag latest image from master branch
Build and Push Container / build-and-push (push) Successful in 4m28s
2026-05-07 15:17:28 -08:00
wayfinderak c41cf31af4 Add Portainer deployment files
Build and Push Container / build-and-push (push) Failing after 18m0s
2026-05-07 13:55:20 -08:00
wayfinderak aa6b9433ba Remove incomplete raffle service references
Build and Push Container / build-and-push (push) Successful in 4m34s
2026-05-04 15:48:18 -08:00
wayfinderak 13f8a97645 Update .gitea/workflows/build-and-push.yml
Build and Push Container / build-and-push (push) Failing after 2m18s
2026-03-23 06:13:39 +00:00
wayfinderak b0b7d4f814 Update .gitea/workflows/build-and-push.yml 2026-03-23 06:12:34 +00:00
wayfinderak a1ee9e35cc Migrate deployment to Gitea Actions and Portainer
Build and Push Container / docker (push) Failing after 19m3s
2026-03-22 11:43:22 -08:00
Dustin Pianalto 940781cb83 Add pgbouncer
CI / build (push) Has been cancelled
2021-10-10 21:54:49 -08:00
Dustin Pianalto 3a7bf68ba9 Update registry
CI / build (push) Has been cancelled
2021-10-05 23:47:59 -08:00
Dustin Pianalto 243fa19e36 Don't run migrations
CI / build (push) Has been cancelled
2021-10-02 17:56:03 -08:00
Dustin Pianalto fcbf803ae2 Merge branch 'development'
CI / build (push) Has been cancelled
2021-10-02 17:17:28 -08:00
Dustin Pianalto 47ecefb048 Update action
CI / build (push) Has been cancelled
2021-10-02 16:59:49 -08:00
Dustin Pianalto 7bffb96431 Update deployment and action
CI / build (push) Has been cancelled
2021-10-02 16:58:26 -08:00
Dustin Pianalto 14390c5c21 Update deployment and action
CI / build (push) Has been cancelled
2021-10-02 16:42:40 -08:00
Dustin Pianalto 1e88425853 force bot to run on node with label
CI / build (push) Has been cancelled
2021-07-19 13:06:16 -08:00
Dustin Pianalto eacdd455f9 force bot to run on node with label
CI / build (push) Has been cancelled
2021-07-19 12:49:57 -08:00
Dustin Pianalto 1e184c97a2 Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 22:00:38 -08:00
Dustin Pianalto 8c2bb50637 Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 21:54:35 -08:00
Dustin Pianalto 5f20f1b129 Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 21:46:31 -08:00
Dustin Pianalto 8a9373637f Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 21:10:53 -08:00
Dustin Pianalto b1f705746e Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 21:00:43 -08:00
Dustin Pianalto 8893cc62f4 Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 20:56:51 -08:00
Dustin Pianalto 0bc5953c65 Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 14:51:04 -08:00
Dustin Pianalto 821ede69cf Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 14:34:03 -08:00
Dustin Pianalto fe2e28357a Add broadcast command
CI / build (push) Has been cancelled
2021-02-24 17:18:52 -09:00
Dustin Pianalto b8ca9506c9 Add broadcast command
CI / build (push) Has been cancelled
2021-02-24 17:09:35 -09:00
Dustin Pianalto 1d8de473c4 Add broadcast command
CI / build (push) Has been cancelled
2021-02-24 16:29:42 -09:00
Dustin Pianalto 6a08f06101 Compare servernames as lower
CI / build (push) Has been cancelled
2021-02-24 14:29:32 -09:00
Dustin Pianalto dddcc8c316 Update format on listplayers output
CI / build (push) Has been cancelled
2021-02-24 14:10:55 -09:00
Dustin Pianalto 5a384305b0 Add initial listplayers
CI / build (push) Has been cancelled
2021-02-24 14:06:18 -09:00
Dustin Pianalto fb5f508fdf Add initial listplayers
CI / build (push) Has been cancelled
2021-02-24 14:01:20 -09:00
Dustin Pianalto 1fbe5ca7bf Add initial listplayers
CI / build (push) Has been cancelled
2021-02-24 13:53:43 -09:00
Dustin Pianalto 2e0762ee0f Fix permission bug in close
CI / build (push) Has been cancelled
2021-02-24 11:37:52 -09:00
Dustin Pianalto ccb450e543 Add view command and update utils
CI / build (push) Has been cancelled
2021-02-24 00:03:12 -09:00
Dustin Pianalto c34f475084 Add view command and update utils
CI / build (push) Has been cancelled
2021-02-23 23:53:28 -09:00
Dustin Pianalto 1a7d9b824f Add view command and update utils
CI / build (push) Has been cancelled
2021-02-23 23:42:02 -09:00
Dustin Pianalto 0bf31a3e5d Add view command and update utils
CI / build (push) Has been cancelled
2021-02-23 23:29:19 -09:00
Dustin Pianalto 128011c79a Add comment command
CI / build (push) Has been cancelled
2021-02-23 21:56:10 -09:00
Dustin Pianalto 53dc44abda Fix bug when updating request
CI / build (push) Has been cancelled
2021-02-23 17:28:51 -09:00
Dustin Pianalto 6262ebfeb4 Fix bug with query
CI / build (push) Has been cancelled
2021-02-23 00:38:20 -09:00
Dustin Pianalto 005dfc815f Move migrations to separate func
CI / build (push) Has been cancelled
2021-02-22 23:59:13 -09:00
Dustin Pianalto 986d16b346 Add ftp credentials to domain types
CI / build (push) Has been cancelled
2021-02-22 23:24:19 -09:00
Dustin Pianalto 83c41e2788 Add ftp credentials to db schema
CI / build (push) Has been cancelled
2021-02-22 23:10:57 -09:00
Dustin Pianalto 24aff1be72 Fix request message
CI / build (push) Has been cancelled
2021-02-22 22:19:25 -09:00
Dustin Pianalto b28beaba0c Fix request message 2021-02-22 22:18:59 -09:00
Dustin Pianalto 4f8aaff94a Fix request message 2021-02-22 22:17:18 -09:00
Dustin Pianalto a21e884bee Fix bug getting messages from db
CI / build (push) Has been cancelled
2021-02-22 22:12:07 -09:00
Dustin Pianalto faf64a8bf9 Add message to end of list with count
CI / build (push) Has been cancelled
2021-02-22 22:03:06 -09:00
Dustin Pianalto 2abe574977 Update database schema to not allow null previous_content
CI / build (push) Has been cancelled
2021-02-22 21:56:18 -09:00
Dustin Pianalto 04c32955c7 Update database schema to not allow null previous_content
CI / build (push) Has been cancelled
2021-02-22 21:29:41 -09:00
Dustin Pianalto 1f70318d26 Update database schema to not allow null previous_content
CI / build (push) Has been cancelled
2021-02-22 21:24:55 -09:00
Dustin Pianalto 47ed519376 Update database schema to not allow null previous_content
CI / build (push) Has been cancelled
2021-02-22 21:16:28 -09:00
Dustin Pianalto 22912c7367 Fix broken SQL query
CI / build (push) Has been cancelled
2021-02-22 20:13:29 -09:00
Dustin Pianalto 6b15540d4e Add close and list commands
CI / build (push) Has been cancelled
2021-02-22 19:59:39 -09:00
Dustin Pianalto e526d27f4a update actions
CI / build (push) Has been cancelled
2021-02-22 19:51:04 -09:00
Dustin Pianalto 68c06a7356 Add request close and list commands
CI / build (push) Has been cancelled
2021-02-22 19:37:38 -09:00
Dustin Pianalto c8277cce42 Merge branch 'development' of github.com:dustinpianalto/Geeksbot into development 2021-02-22 14:05:09 -09:00
Dustin Pianalto 3069e24e8d Move db and services to pkg 2021-02-22 14:04:51 -09:00
Dustin Pianalto 472f23cc2b start close command 2021-02-07 11:27:33 -09:00
Dustin Pianalto 6d920e615d Add sar commands
CI / build (push) Has been cancelled
2021-01-30 22:52:25 -09:00
Dustin Pianalto 0b8b57a884 Add sar commands
CI / build (push) Has been cancelled
2021-01-30 22:42:14 -09:00
Dustin Pianalto 9382798997 Add sar commands
CI / build (push) Has been cancelled
2021-01-30 22:31:22 -09:00
Dustin Pianalto 24448c79f5 Add sar commands
CI / build (push) Has been cancelled
2021-01-30 22:17:01 -09:00
Dustin Pianalto 71aac148e0 remove mod/admin role command
CI / build (push) Has been cancelled
2021-01-26 00:08:20 -09:00
Dustin Pianalto 132bf94332 remove mod/admin role command
CI / build (push) Has been cancelled
2021-01-25 23:53:32 -09:00
Dustin Pianalto 964be05c48 remove mod/admin role command
CI / build (push) Has been cancelled
2021-01-25 23:49:58 -09:00
Dustin Pianalto 4895294969 fix role commands
CI / build (push) Has been cancelled
2021-01-25 23:09:21 -09:00
Dustin Pianalto 9d0d1ddd56 fix role commands
CI / build (push) Has been cancelled
2021-01-25 23:04:43 -09:00
Dustin Pianalto a587a64bd9 fix role commands
CI / build (push) Has been cancelled
2021-01-25 23:01:02 -09:00
Dustin Pianalto 53276a1442 add admin role command
CI / build (push) Has been cancelled
2021-01-25 22:41:51 -09:00
Dustin Pianalto cdbeac195f add moderator role command
CI / build (push) Has been cancelled
2021-01-25 22:21:56 -09:00
Dustin Pianalto 8256b596ff add moderator role command
CI / build (push) Has been cancelled
2021-01-25 21:52:12 -09:00
Dustin Pianalto 9e1702fa4b fix create request command
CI / build (push) Has been cancelled
2021-01-25 02:31:36 -09:00
Dustin Pianalto b6f90b61c5 fix create request command
CI / build (push) Has been cancelled
2021-01-25 02:27:56 -09:00
Dustin Pianalto 764ceb79ec fix create request sql query
CI / build (push) Has been cancelled
2021-01-25 02:20:11 -09:00
Dustin Pianalto e89805bf8e fix create channel sql query
CI / build (push) Has been cancelled
2021-01-25 02:11:28 -09:00
Dustin Pianalto cb7c487b42 fix create channel sql query
CI / build (push) Has been cancelled
2021-01-25 02:05:13 -09:00
Dustin Pianalto e1ea9cab1f fix create channel sql query
CI / build (push) Has been cancelled
2021-01-25 01:59:57 -09:00
Dustin Pianalto a6dc6f5e56 fix get user sql query
CI / build (push) Has been cancelled
2021-01-25 01:52:14 -09:00
Dustin Pianalto 203d1bbf69 fix get user sql query
CI / build (push) Has been cancelled
2021-01-25 01:43:31 -09:00
Dustin Pianalto c504f7b165 fix get user sql query
CI / build (push) Has been cancelled
2021-01-25 01:38:22 -09:00
Dustin Pianalto 34564140f5 add request command
CI / build (push) Has been cancelled
2021-01-25 01:33:46 -09:00
Dustin Pianalto e3ccc56dba add request command
CI / build (push) Has been cancelled
2021-01-25 01:21:49 -09:00
Dustin Pianalto e19f987c4e add request command
CI / build (push) Has been cancelled
2021-01-24 22:57:55 -09:00
Dustin Pianalto 552664268b use custom prefixes
CI / build (push) Has been cancelled
2021-01-24 01:11:22 -09:00
Dustin Pianalto 414757188e remove duplicate prefixes
CI / build (push) Has been cancelled
2021-01-24 01:05:16 -09:00
Dustin Pianalto 888d356b67 debug removing prefix
CI / build (push) Has been cancelled
2021-01-24 00:57:00 -09:00
Dustin Pianalto c776b25899 debug removing prefix
CI / build (push) Has been cancelled
2021-01-24 00:53:04 -09:00
Dustin Pianalto 81f6e23487 Fix array in guild service
CI / build (push) Has been cancelled
2021-01-24 00:46:41 -09:00
Dustin Pianalto 6cf574b22d Add prefix commands
CI / build (push) Has been cancelled
2021-01-24 00:40:02 -09:00
Dustin Pianalto 623df1d55a Add prefix commands
CI / build (push) Has been cancelled
2021-01-24 00:26:34 -09:00
Dustin Pianalto 489d96594c Add prefix commands
CI / build (push) Has been cancelled
2021-01-24 00:24:07 -09:00
Dustin Pianalto 580eea3dfa Fix nullability of columns 2021-01-23 20:10:48 -09:00
Dustin Pianalto 7a8e7bf213 use nullable string in user
CI / build (push) Has been cancelled
2021-01-23 16:05:02 -09:00
Dustin Pianalto 96e8388562 fix bug in user database
CI / build (push) Has been cancelled
2021-01-23 15:10:04 -09:00
Dustin Pianalto 6369f37ce5 fix bug in user service
CI / build (push) Has been cancelled
2021-01-23 15:03:15 -09:00
Dustin Pianalto ab2d51c582 fix bug in user service
CI / build (push) Has been cancelled
2021-01-23 14:59:35 -09:00
Dustin Pianalto 5400d6acd9 fix bug in user service
CI / build (push) Has been cancelled
2021-01-23 14:48:59 -09:00
Dustin Pianalto 74edd574b3 fix bug in user service
CI / build (push) Has been cancelled
2021-01-23 14:46:25 -09:00
Dustin Pianalto 266cde6468 fix bug in running migrations
CI / build (push) Has been cancelled
2021-01-23 04:27:34 -09:00
Dustin Pianalto 8b646731ee change test command name
CI / build (push) Has been cancelled
2021-01-23 04:20:17 -09:00
Dustin Pianalto c54f8450b1 fix sql typo
CI / build (push) Has been cancelled
2021-01-23 04:14:29 -09:00
Dustin Pianalto 12f5b43f35 rework services and add test command
CI / build (push) Has been cancelled
2021-01-23 03:53:34 -09:00
Dustin Pianalto 9724f77c8e Initialize services 2021-01-23 03:11:12 -09:00
Dustin Pianalto 780613d7b9 initial database crud 2021-01-23 01:25:06 -09:00
Dustin Pianalto 94dcb738bc debug errors
CI / build (push) Has been cancelled
2021-01-21 00:19:52 -09:00
Dustin Pianalto 84e2bdea5e debug errors
CI / build (push) Has been cancelled
2021-01-20 23:58:25 -09:00
Dustin Pianalto 63e6212a0b debug errors
CI / build (push) Has been cancelled
2021-01-20 23:28:15 -09:00
Dustin Pianalto cbd899ff8c debug errors
CI / build (push) Has been cancelled
2021-01-20 23:22:23 -09:00
Dustin Pianalto c9ac3235db Fix syntax errors
CI / build (push) Has been cancelled
2021-01-20 23:18:30 -09:00
Dustin Pianalto 4dc9a6e846 Test adding migration files to container
CI / build (push) Has been cancelled
2021-01-20 23:04:17 -09:00
Dustin Pianalto 662db7cd9d Test adding migration files to container 2021-01-20 23:04:14 -09:00
Dustin Pianalto 57072010dc Test adding migration files to container
CI / build (push) Has been cancelled
2021-01-20 22:44:17 -09:00
Dustin Pianalto ab8db644cb Test adding migration files to container
CI / build (push) Has been cancelled
2021-01-20 22:40:15 -09:00
Dustin Pianalto 1d3a218e2d Check error when running migrations
CI / build (push) Has been cancelled
2021-01-20 22:37:04 -09:00
Dustin Pianalto 080a417eff Check error when running migrations
CI / build (push) Has been cancelled
2021-01-20 22:21:01 -09:00
Dustin Pianalto 4e1fa43e8e Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 22:13:59 -09:00
Dustin Pianalto eed0ca1865 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 22:11:22 -09:00
Dustin Pianalto 2e7b1d2531 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 22:10:39 -09:00
Dustin Pianalto cd0fb03605 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 22:08:22 -09:00
Dustin Pianalto cc8fff4e3d Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:59:24 -09:00
Dustin Pianalto 3e98bd145a Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:53:56 -09:00
Dustin Pianalto 36a3cd26ba Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:50:13 -09:00
Dustin Pianalto d3bbef1d7f Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:40:29 -09:00
Dustin Pianalto bec8f37fa5 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:37:58 -09:00
Dustin Pianalto a097deefac Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:36:43 -09:00
Dustin Pianalto 0b310e3d00 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:28:55 -09:00
Dustin Pianalto eecf4e4be8 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:10:06 -09:00
Dustin Pianalto 08a2241d6c Connect to db in main
CI / build (push) Has been cancelled
2021-01-20 21:07:23 -09:00
Dustin Pianalto fb73d50d86 Add basic database setup 2021-01-20 21:06:01 -09:00
Dustin Pianalto 2d60384002 Add domain types 2021-01-20 17:39:18 -09:00
Dustin Pianalto 9436a4385f Change token env variable
CI / build (push) Has been cancelled
2021-01-19 01:56:56 -09:00
Dustin Pianalto 3e77b98be4 change deployment name
CI / build (push) Has been cancelled
2021-01-19 01:50:40 -09:00
Dustin Pianalto 2c5d4a62aa Add missing deps
CI / build (push) Has been cancelled
2021-01-19 01:02:46 -09:00
Dustin Pianalto 5abaf88102 Add missing deps 2021-01-19 00:59:58 -09:00
Dustin Pianalto f1980e9bcb Remove missing deps 2021-01-19 00:56:21 -09:00
Dustin Pianalto e0de5433df Basic bot and kubernetes deployment 2021-01-19 00:51:30 -09:00
Dustin Pianalto 6d67134fb7 Initial structure 2020-12-17 16:43:34 -09:00
Dusty.P 8b67892946 Update and rename README.md to README 2020-12-15 23:00:56 -09:00
Dusty.P 9c7b24b9d7 Create LICENSE 2020-12-15 23:00:28 -09:00
7 changed files with 11 additions and 92 deletions
-5
View File
@@ -1,5 +0,0 @@
# Service release contract
Butler resolves this repository's protected source revision to verified immutable images. The platform updates only image references in the existing production Compose file and restarts only the already running application services. It preserves current environment, storage, routes, and provider configuration. It retains previous application images and restores them if readiness fails.
Migration and maintenance images are pinned when declared, but this release operation does not run database migrations or maintenance jobs. A release requiring a schema change needs the corresponding explicit platform migration first. No homelab image-pin commit is required for an ordinary compatible application release.
-12
View File
@@ -1,12 +0,0 @@
{
"version": 1,
"deployment": "geeksbot-release",
"environment": "production",
"images": {
"geeksbot_release_geeksbot_image": {
"name": "geeksbot",
"tag": "sha-{revision}"
}
},
"revision_variable": "geeksbot_release_revision"
}
+8 -31
View File
@@ -3,22 +3,15 @@ name: Build and Push Container
on: on:
push: push:
branches: branches:
- master - master
- main
tags: tags:
- v* - v*
workflow_dispatch: null workflow_dispatch:
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number
|| github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs: jobs:
build-and-push: build-and-push:
runs-on: butler-ci runs-on: ubuntu-latest
env: env:
REGISTRY: gitea.wayfinderak.com REGISTRY: gitea.wayfinderak.com
IMAGE_NAME: gitea.wayfinderak.com/wayfinderak/geeksbot IMAGE_NAME: gitea.wayfinderak.com/wayfinderak/geeksbot
@@ -26,20 +19,9 @@ jobs:
options: --dns 172.16.30.10 options: --dns 172.16.30.10
steps: steps:
- name: Checkout - name: Checkout
uses: https://github.com/actions/checkout@v4 uses: actions/checkout@v4
- name: Select relevant delivery work
id: delivery
env:
DELIVERY_EVENT: ${{ github.event_name }}
DELIVERY_REF: ${{ github.ref }}
DELIVERY_SHA: ${{ github.sha }}
DELIVERY_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
run: |
cd .
bash scripts/ci-select.sh
- name: Install Go and Docker CLI if needed - name: Install Go and Docker CLI if needed
if: ${{ steps.delivery.outputs.run == 'true' }}
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
@@ -80,11 +62,9 @@ jobs:
docker version docker version
- name: Run tests - name: Run tests
if: ${{ steps.delivery.outputs.run == 'true' }}
run: go test ./... run: go test ./...
- name: Log in to Gitea Container Registry - name: Log in to Gitea Container Registry
if: ${{ (steps.delivery.outputs.run == 'true') && github.event_name != 'pull_request' }}
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
@@ -99,7 +79,6 @@ jobs:
exit 1 exit 1
- name: Determine image tags - name: Determine image tags
if: ${{ steps.delivery.outputs.run == 'true' }}
id: meta id: meta
shell: bash shell: bash
env: env:
@@ -108,7 +87,7 @@ jobs:
SHA: ${{ gitea.sha }} SHA: ${{ gitea.sha }}
run: | run: |
set -euo pipefail set -euo pipefail
tags=("$IMAGE_NAME:sha-$SHA") tags=()
if [[ "$REF" == refs/tags/* ]]; then if [[ "$REF" == refs/tags/* ]]; then
version="$REF_NAME" version="$REF_NAME"
@@ -130,7 +109,6 @@ jobs:
printf 'EOF\n' >> "$GITHUB_OUTPUT" printf 'EOF\n' >> "$GITHUB_OUTPUT"
- name: Build image - name: Build image
if: ${{ steps.delivery.outputs.run == 'true' }}
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
@@ -143,10 +121,9 @@ jobs:
build_args+=(--tag "$tag") build_args+=(--tag "$tag")
done done
docker build --label "org.opencontainers.image.revision=$GITHUB_SHA" "${build_args[@]}" . docker build "${build_args[@]}" .
- name: Push image - name: Push image
if: ${{ (steps.delivery.outputs.run == 'true') && github.event_name != 'pull_request' }}
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
-2
View File
@@ -1,4 +1,2 @@
.env .env
.idea .idea
portainer-app.env
+3
View File
@@ -0,0 +1,3 @@
DATABASE_URL=postgresql://geeksbot:kW6JzIQhBi4r7rRcKi3l2ct4@10.0.0.202:5432/geeksbot
DISCORD_TOKEN=Mzk2NTg4OTk2NzA2MzA0MDEw.GybJWT.KYhcnh1Zn72splQaEW92A4GmM13Au9d40t4qtI
STEAM_API_KEY=A8309D7186F7E523E83972CA0A92C486
-3
View File
@@ -1,3 +0,0 @@
DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/geeksbot?sslmode=disable
DISCORD_TOKEN=replace-me
STEAM_API_KEY=replace-me
-39
View File
@@ -1,39 +0,0 @@
#!/usr/bin/env bash
# Keep required jobs alive; only skip reviewed non-runtime documentation paths.
set -euo pipefail
base="${DELIVERY_BASE:-}"
head="$(git rev-parse HEAD)"
run=true
if [[ "${DELIVERY_REF:-}" != refs/tags/* && "$head" == "${DELIVERY_SHA:-}" && "${DELIVERY_EVENT:-}" =~ ^(push|pull_request)$ && "$base" =~ ^[0-9a-f]{40}$ && "$base" != 0000000000000000000000000000000000000000 ]]; then
if ! git cat-file -e "$base^{commit}" 2>/dev/null; then
if [[ -n "${DELIVERY_FETCH_TOKEN:-}" ]]; then
git -c "http.extraHeader=Authorization: token ${DELIVERY_FETCH_TOKEN}" fetch --quiet --depth=1 origin "$base" >/dev/null 2>&1 || true
else
git fetch --quiet --depth=1 origin "$base" >/dev/null 2>&1 || true
fi
fi
if git cat-file -e "$base^{commit}" 2>/dev/null; then
paths="$(mktemp)"
trap 'rm -f -- "$paths"' EXIT
# Snapshot comparison is conservative when main advanced during a PR.
# Both rename sides remain visible, including names containing newlines.
if git diff --no-renames --name-only -z "$base" "$head" > "$paths"; then
run=false
while IFS= read -r -d '' path; do
case "$path" in
README.md|CHANGELOG.md|LICENSE|LICENSE.md) ;;
*) run=true; break ;;
esac
done < "$paths"
fi
fi
fi
if [[ "$run" == false ]]; then
echo 'Only reviewed non-runtime documentation changed; build and validation are not applicable.'
else
echo 'Runtime, unknown inputs, or unavailable event history: run required validation.'
fi
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
echo "run=$run" >> "$GITHUB_OUTPUT"
fi
printf '%s\n' "$run"