Skip to content

jwks-observer-run

jwks-observer-run #223

name: jwks-observer-run
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
jobs:
build-and-test:
name: Run JWKS Observer
runs-on: arc-runner-set
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25.5' # GOVERSION
- name: Cache Go modules
uses: actions/cache@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod download
- name: Run the application
run: go run .
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit changes
run: |
git add data
git commit -m "Updated data on $(date '+%Y-%m-%d %H:%M:%S')" || echo "No changes to commit"
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Update the remote URL to include the token for authentication
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
# Push the changes to the branch that triggered the workflow
git push origin HEAD:${{ github.ref }}