From 636bfade32b6e0c6471493a2a7598645990e8cc9 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Thu, 5 Jun 2025 13:32:08 -0700 Subject: [PATCH] Create gh-token.yml --- .github/workflows/gh-token.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/gh-token.yml diff --git a/.github/workflows/gh-token.yml b/.github/workflows/gh-token.yml new file mode 100644 index 00000000..23564003 --- /dev/null +++ b/.github/workflows/gh-token.yml @@ -0,0 +1,24 @@ +name: GitHub Token Refresh + +on: + schedule: + - cron: '*/5 * * * *' # Runs every 5 minutes + workflow_dispatch: # Allows manual triggering + +permissions: + contents: write + id-token: write + +jobs: + refresh-token: + name: Refresh GitHub Token + if: github.server_url != 'https://github.com' + uses: CSVD/centralized-actions/.github/workflows/upload-github-token.yml@main + with: + aws_region: 'us-gov-west-1' + secret_name: '/eks-cluster-deployment/github_token' # This matches the SECRET_NAME in app.py + github_app_id: ${{ vars.GH_APP_ID }} + github_app_installation_id: ${{ vars.GH_APP_INSTALLATION_ID }} + use_ecs_credentials: true + secrets: + github_app_pem_file: ${{ secrets.GH_APP_PEM_FILE }}