GBP Collection #6001
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
name: GBP Collection | |
# Every hour at the :20 minute mark. GitHub tells us to pick odd hours, instead of just using the start. | |
on: | |
schedule: | |
- cron: "20 * * * *" | |
workflow_dispatch: | |
jobs: | |
gbp_collection: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps" | |
id: value_holder | |
env: | |
ENABLER_SECRET: ${{ secrets.ACTION_ENABLER }} | |
run: | | |
unset SECRET_EXISTS | |
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi | |
echo "ACTIONS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT | |
- name: Checkout | |
if: steps.value_holder.outputs.ACTIONS_ENABLED | |
uses: actions/checkout@v4 | |
- name: Setup git | |
if: steps.value_holder.outputs.ACTIONS_ENABLED | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Checkout alternate branch | |
if: steps.value_holder.outputs.ACTIONS_ENABLED | |
uses: actions/checkout@v4 | |
with: | |
ref: "gbp-balances" # The branch name | |
path: gbp-balances | |
# This is to ensure we keep the gbp.toml from master | |
# without having to update our separate branch. | |
- name: Copy configuration | |
if: steps.value_holder.outputs.ACTIONS_ENABLED | |
run: cp ./.github/gbp.toml ./gbp-balances/.github/gbp.toml | |
- name: GBP action | |
if: steps.value_holder.outputs.ACTIONS_ENABLED | |
uses: tgstation/gbp-action@master | |
with: | |
collect: "true" | |
directory: ./gbp-balances | |
token: ${{ secrets.GITHUB_TOKEN }} |