mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-20 21:57:44 +01:00
0150ce8505
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
67 lines
2.5 KiB
YAML
67 lines
2.5 KiB
YAML
name: Label and GBP
|
|
on:
|
|
pull_request_target:
|
|
types: [closed, opened, synchronize]
|
|
jobs:
|
|
# labeler must run before gbp because gbp calculates itself based on labels
|
|
labeler:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.action == 'opened' || github.event.action == 'synchronize'
|
|
permissions:
|
|
pull-requests: write # to apply labels
|
|
issues: write # to apply labels
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Run Auto Labeler
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
const { get_updated_label_set } = await import('${{ github.workspace }}/tools/pull_request_hooks/autoLabel.js');
|
|
const new_labels = await get_updated_label_set({ github, context });
|
|
github.rest.issues.setLabels({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
labels: new_labels,
|
|
});
|
|
console.log(`Labels updated: ${new_labels}`);
|
|
gbp:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.action == 'opened' || github.event.action == 'closed'
|
|
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@v6
|
|
- name: Setup git
|
|
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
|
run: |
|
|
git config --global user.name "gbp-action"
|
|
git config --global user.email "<>"
|
|
- name: Checkout alternate branch
|
|
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
|
uses: actions/checkout@v6
|
|
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:
|
|
branch: "gbp-balances"
|
|
directory: ./gbp-balances
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|