-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add daily check for core update (#955)
* ci: add daily check for core update * update * update
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Update Core to Latest Commit | ||
|
||
on: | ||
schedule: | ||
- cron: '40 1 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update-pomerium-core: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b | ||
- name: Setup Go | ||
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 | ||
with: | ||
go-version: 1.22.x | ||
- name: Update Core | ||
run: | | ||
go get -u github.com/pomerium/pomerium@main | ||
go mod tidy | ||
- name: Check for changes | ||
id: git-diff | ||
run: | | ||
git config --global user.email "apparitor@users.noreply.github.com" | ||
git config --global user.name "GitHub Actions" | ||
git add go.mod go.sum | ||
git diff --cached --exit-code || echo "changed=true" >> $GITHUB_OUTPUT | ||
- name: Create Pull Request | ||
if: ${{ steps.git-diff.outputs.changed }} == 'true' | ||
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e | ||
with: | ||
author: GitHub Actions <apparitor@users.noreply.github.com> | ||
body: "This PR updates the Pomerium Core to the latest commit in main" | ||
branch-suffix: random | ||
branch: ci/update-core | ||
commit-message: "ci: update core to latest commit in main" | ||
delete-branch: true | ||
labels: ci | ||
title: "ci: update core to latest commit in main" | ||
token: ${{ secrets.APPARITOR_GITHUB_TOKEN }} |