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
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2
updates:
- package-ecosystem: github-actions
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: 'Dependency Review'
on: [pull_request]

Expand All @@ -6,7 +7,7 @@ permissions:

jobs:
dependency-review:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v6
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Docker build

on:
Expand All @@ -11,8 +12,8 @@ permissions:
jobs:
build:
name: Docker build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Docker build
run: docker build .
- uses: actions/checkout@v6
- name: Docker build
run: docker build .
3 changes: 2 additions & 1 deletion .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Release Docker
on:
workflow_run:
Expand All @@ -13,7 +14,7 @@ permissions:

jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
Expand Down
59 changes: 30 additions & 29 deletions .github/workflows/release-webhook.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Release Webhook
on:
workflow_run:
Expand All @@ -12,33 +13,33 @@ permissions:

jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: arnested/go-version-action@v1
id: version
with:
working-directory: webhook
- run: echo ::set-output name=go-runtime::$(echo -n go${{ steps.version.outputs.go-mod-version }} | cut -d . -f 1-2 | tr -d '.')
id: runtime
- uses: google-github-actions/auth@v3
with:
credentials_json: '${{ secrets.GCLOUD_AUTH }}'
- uses: google-github-actions/deploy-cloud-functions@v2
with:
source_dir: ./webhook/
name: ${{ secrets.CF_NAME }}
region: ${{ secrets.CF_REGION }}
project_id: ${{ secrets.CF_PROJECT }}
runtime: ${{ steps.runtime.outputs.go-runtime }}
entry_point: "Handle"
env_vars: GITHUB_SECRET=${{ secrets.SHARED_SECRET }},GITHUB_TEAM_SLUG=${{ secrets.TEAM_SLUG }},NOTIFY=${{ secrets.NOTIFY }},TZ=Europe/Copenhagen
description: ${{ github.repository }}
https_trigger_security_level: secure_always
memory_mb: 128
- name: Post status to Zulip
if: ${{ always() }}
uses: containrrr/shoutrrr-action@v1
with:
url: "${{ secrets.ZULIP_SHOUTRRR_URL }}?stream=logs&topic=reviewbot"
message: "Deployed `${{ github.repository }}`@`${{ github.sha }}` to Google Cloud Function `${{ secrets.CF_NAME }}`@`${{ secrets.CF_PROJECT }}`: **${{ job.status }}**."
- uses: actions/checkout@v6
- uses: arnested/go-version-action@v1
id: version
with:
working-directory: webhook
- run: echo go-runtime="$(echo -n go${{ steps.version.outputs.go-mod-version }} | cut -d . -f 1-2 | tr -d '.')" >> "${GITHUB_OUTPUT}"
id: runtime
- uses: google-github-actions/auth@v3
with:
credentials_json: '${{ secrets.GCLOUD_AUTH }}'
- uses: google-github-actions/deploy-cloud-functions@v2
with:
source_dir: ./webhook/
name: ${{ secrets.CF_NAME }}
region: ${{ secrets.CF_REGION }}
project_id: ${{ secrets.CF_PROJECT }}
runtime: ${{ steps.runtime.outputs.go-runtime }}
entry_point: "Handle"
env_vars: GITHUB_SECRET=${{ secrets.SHARED_SECRET }},GITHUB_TEAM_SLUG=${{ secrets.TEAM_SLUG }},NOTIFY=${{ secrets.NOTIFY }},TZ=Europe/Copenhagen
description: ${{ github.repository }}
https_trigger_security_level: secure_always
memory_mb: 128
- name: Post status to Zulip
if: ${{ always() }}
uses: containrrr/shoutrrr-action@v1
with:
url: "${{ secrets.ZULIP_SHOUTRRR_URL }}?stream=logs&topic=reviewbot"
message: "Deployed `${{ github.repository }}`@`${{ github.sha }}` to Google Cloud Function `${{ secrets.CF_NAME }}`@`${{ secrets.CF_PROJECT }}`: **${{ job.status }}**."
24 changes: 9 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build and test

on:
Expand All @@ -12,20 +13,13 @@ permissions:
jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: arnested/go-version-action@v1
id: version
with:
- uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: webhook/go.mod
- name: go test
working-directory: webhook
- name: Setup Go ${{ steps.version.outputs.go-mod-version }}
uses: WillAbides/setup-go-faster@v1.14.0
with:
go-version: ${{ steps.version.outputs.go-mod-version }}
ignore-local: true
- name: go test
working-directory: webhook
env:
GO111MODULE: 'on'
run: go test --verbose -race -cover -covermode=atomic ./...
run: go test --verbose -race -cover -covermode=atomic ./...