generated from ipdxco/github-as-code
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from filecoin-project/master-upgrade
upgrade@8325728720
- Loading branch information
Showing
29 changed files
with
6,148 additions
and
5,421 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Clean Up | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
members: | ||
description: 'The members added to the org recently (JSON Array)' | ||
required: false | ||
default: '[]' | ||
repository-collaborators: | ||
description: 'The repository collaborators added to the org recently (JSON Map)' | ||
required: false | ||
default: '{}' | ||
team-members: | ||
description: 'The team members added to the org recently (JSON Map)' | ||
required: false | ||
default: '{}' | ||
cutoff: | ||
description: 'The number of months to consider for inactivity' | ||
required: false | ||
default: '12' | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
sync: | ||
permissions: | ||
contents: write | ||
name: Clean Up | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_APP_ID: ${{ secrets.RO_GITHUB_APP_ID }} | ||
GITHUB_APP_INSTALLATION_ID: ${{ secrets[format('RO_GITHUB_APP_INSTALLATION_ID_{0}', github.repository_owner)] || secrets.RO_GITHUB_APP_INSTALLATION_ID }} | ||
GITHUB_APP_PEM_FILE: ${{ secrets.RO_GITHUB_APP_PEM_FILE }} | ||
TF_WORKSPACE: ${{ github.repository_owner }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Initialize scripts | ||
run: npm install && npm run build | ||
working-directory: scripts | ||
- name: Remove inactive members | ||
run: node lib/actions/remove-inactive-members.js | ||
working-directory: scripts | ||
env: | ||
NEW_MEMBERS: ${{ github.event.inputs.members }} | ||
NEW_REPOSITORY_COLLABORATORS: ${{ github.event.inputs['repository-collaborators'] }} | ||
NEW_TEAM_MEMBERS: ${{ github.event.inputs['team-members'] }} | ||
CUTOFF_IN_MONTHS: ${{ github.event.inputs.cutoff }} | ||
- name: Check if github was modified | ||
id: github-modified | ||
run: | | ||
if [ -z "$(git status --porcelain -- github)" ]; then | ||
echo "this=false" >> $GITHUB_OUTPUT | ||
else | ||
echo "this=true" >> $GITHUB_OUTPUT | ||
fi | ||
- uses: ./.github/actions/git-config-user | ||
if: steps.github-modified.outputs.this == 'true' | ||
- if: steps.github-modified.outputs.this == 'true' | ||
env: | ||
SUFFIX: cleanup | ||
run: | | ||
git add --all -- github | ||
git commit -m "cleanup@${GITHUB_RUN_ID}" | ||
git checkout -B "${GITHUB_REF_NAME}-${SUFFIX}" | ||
git push origin "${GITHUB_REF_NAME}-${SUFFIX}" --force |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Labels | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
source: | ||
description: 'The source repository to sync labels from' | ||
required: true | ||
targets: | ||
description: 'The target repositories to sync labels to (comma-separated)' | ||
required: true | ||
add: | ||
description: 'Whether to add labels to the target repositories' | ||
required: false | ||
default: true | ||
remove: | ||
description: 'Whether to remove labels from the target repositories' | ||
required: false | ||
default: false | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
sync: | ||
permissions: | ||
contents: read | ||
name: Sync | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_APP_ID: ${{ secrets.RW_GITHUB_APP_ID }} | ||
GITHUB_APP_INSTALLATION_ID: ${{ secrets[format('RW_GITHUB_APP_INSTALLATION_ID_{0}', github.repository_owner)] || secrets.RW_GITHUB_APP_INSTALLATION_ID }} | ||
GITHUB_APP_PEM_FILE: ${{ secrets.RW_GITHUB_APP_PEM_FILE }} | ||
TF_WORKSPACE: ${{ github.repository_owner }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Initialize scripts | ||
run: npm install && npm run build | ||
working-directory: scripts | ||
- name: Sync | ||
run: node lib/actions/sync-labels.js | ||
working-directory: scripts | ||
env: | ||
SOURCE_REPOSITORY: ${{ github.event.inputs.source }} | ||
TARGET_REPOSITORIES: ${{ github.event.inputs.targets }} | ||
ADD_LABELS: ${{ github.event.inputs.add }} | ||
REMOVE_LABELS: ${{ github.event.inputs.remove }} |
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
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
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
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
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
Oops, something went wrong.