[GitHub] Workflows will now time out after 10 minutes (#6441)

This commit is contained in:
NightKev 2025-08-26 23:39:26 -07:00 committed by GitHub
parent 4b18ad74b3
commit 2afd4f57cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 16 additions and 0 deletions

View File

@ -20,6 +20,7 @@ permissions:
jobs: jobs:
create-release: create-release:
if: github.repository == 'pagefaultgames/pokerogue' && (vars.BETA_DEPLOY_BRANCH == '' || ! startsWith(vars.BETA_DEPLOY_BRANCH, 'release')) if: github.repository == 'pagefaultgames/pokerogue' && (vars.BETA_DEPLOY_BRANCH == '' || ! startsWith(vars.BETA_DEPLOY_BRANCH, 'release'))
timeout-minutes: 10
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed for github cli commands GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed for github cli commands
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -36,11 +37,13 @@ jobs:
exit 1 exit 1
fi fi
shell: bash shell: bash
- uses: actions/create-github-app-token@v2 - uses: actions/create-github-app-token@v2
id: app-token id: app-token
with: with:
app-id: ${{ secrets.PAGEFAULT_APP_ID }} app-id: ${{ secrets.PAGEFAULT_APP_ID }}
private-key: ${{ secrets.PAGEFAULT_APP_PRIVATE_KEY }} private-key: ${{ secrets.PAGEFAULT_APP_PRIVATE_KEY }}
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@ -48,8 +51,10 @@ jobs:
# Always base off of beta branch, regardless of the branch the workflow was triggered from. # Always base off of beta branch, regardless of the branch the workflow was triggered from.
ref: beta ref: beta
token: ${{ steps.app-token.outputs.token }} token: ${{ steps.app-token.outputs.token }}
- name: Create release branch - name: Create release branch
run: git checkout -b release run: git checkout -b release
# In order to be able to open a PR into beta, we need the branch to have at least one change. # In order to be able to open a PR into beta, we need the branch to have at least one change.
- name: Overwrite RELEASE file - name: Overwrite RELEASE file
run: | run: |
@ -58,11 +63,14 @@ jobs:
echo "Release v${{ github.event.inputs.versionName }}" > RELEASE echo "Release v${{ github.event.inputs.versionName }}" > RELEASE
git add RELEASE git add RELEASE
git commit -m "Stage release v${{ github.event.inputs.versionName }}" git commit -m "Stage release v${{ github.event.inputs.versionName }}"
- name: Push new branch - name: Push new branch
run: git push origin release run: git push origin release
# The repository variable is used by the deploy-beta workflow to determine whether to deploy from beta or release. # The repository variable is used by the deploy-beta workflow to determine whether to deploy from beta or release.
- name: Set repository variable - name: Set repository variable
run: GITHUB_TOKEN="${{ steps.app-token.outputs.token }}" gh variable set BETA_DEPLOY_BRANCH --body "release" run: GITHUB_TOKEN="${{ steps.app-token.outputs.token }}" gh variable set BETA_DEPLOY_BRANCH --body "release"
- name: Create pull request to main - name: Create pull request to main
run: | run: |
gh pr create --base main \ gh pr create --base main \
@ -70,6 +78,7 @@ jobs:
--title "Release v${{ github.event.inputs.versionName }} to main" \ --title "Release v${{ github.event.inputs.versionName }} to main" \
--body "This PR is for the release of v${{ github.event.inputs.versionName }}, and was created automatically by the GitHub Actions workflow invoked by ${{ github.actor }}" \ --body "This PR is for the release of v${{ github.event.inputs.versionName }}, and was created automatically by the GitHub Actions workflow invoked by ${{ github.actor }}" \
--draft --draft
- name: Create pull request to beta - name: Create pull request to beta
run: | run: |
gh pr create --base beta \ gh pr create --base beta \

View File

@ -12,6 +12,7 @@ on:
jobs: jobs:
deploy: deploy:
if: github.repository == 'pagefaultgames/pokerogue' && github.ref_name == (vars.BETA_DEPLOY_BRANCH || 'beta') if: github.repository == 'pagefaultgames/pokerogue' && github.ref_name == (vars.BETA_DEPLOY_BRANCH || 'beta')
timeout-minutes: 10
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@ -11,6 +11,7 @@ on:
jobs: jobs:
deploy: deploy:
if: github.repository == 'pagefaultgames/pokerogue' if: github.repository == 'pagefaultgames/pokerogue'
timeout-minutes: 10
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@ -20,6 +20,7 @@ jobs:
pages: pages:
name: Github Pages name: Github Pages
if: github.repository == 'pagefaultgames/pokerogue' if: github.repository == 'pagefaultgames/pokerogue'
timeout-minutes: 10
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
api-dir: ./ api-dir: ./

View File

@ -19,6 +19,7 @@ on:
jobs: jobs:
run-linters: run-linters:
name: Run linters name: Run linters
timeout-minutes: 10
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -6,6 +6,7 @@ jobs:
# Set the BETA_DEPLOY_BRANCH variable to beta when a release branch is deleted # Set the BETA_DEPLOY_BRANCH variable to beta when a release branch is deleted
update-release-var: update-release-var:
if: github.repository == 'pagefaultgames/pokerogue' && github.event.ref_type == 'branch' && github.event.ref == 'release' if: github.repository == 'pagefaultgames/pokerogue' && github.event.ref_type == 'branch' && github.event.ref == 'release'
timeout-minutes: 5
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set BETA_DEPLOY_BRANCH to beta - name: Set BETA_DEPLOY_BRANCH to beta

View File

@ -21,6 +21,7 @@ jobs:
test: test:
# We can't use dynmically named jobs until https://github.com/orgs/community/discussions/13261 is implemented # We can't use dynmically named jobs until https://github.com/orgs/community/discussions/13261 is implemented
name: Shard name: Shard
timeout-minutes: 10
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ !inputs.skip }} if: ${{ !inputs.skip }}
steps: steps:

View File

@ -19,6 +19,7 @@ on:
jobs: jobs:
check-path-change-filter: check-path-change-filter:
timeout-minutes: 5
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
pull-requests: read pull-requests: read