mirror of
https://github.com/simple-icons/simple-icons.git
synced 2025-01-25 01:32:58 +02:00
Use simple-icons[bot]
for actions (#10726)
This commit is contained in:
parent
d57fbbbc3d
commit
8091607703
36
.github/workflows/add-labels-priority.yml
vendored
36
.github/workflows/add-labels-priority.yml
vendored
@ -8,18 +8,27 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.action == 'opened'
|
if: github.event.action == 'opened'
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- uses: simple-icons/labeler@v1
|
- uses: simple-icons/labeler@v1
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ steps.app-token.outputs.token }}
|
||||||
|
|
||||||
assign-to-project:
|
assign-to-project:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Assign to Project
|
name: Assign to Project
|
||||||
if: github.event.action == 'opened'
|
if: github.event.action == 'opened'
|
||||||
needs: triage
|
needs: triage
|
||||||
env:
|
|
||||||
MY_GITHUB_TOKEN: ${{ secrets.AUTO_ASSIGN_WORKFLOW_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -33,7 +42,7 @@ jobs:
|
|||||||
- id: get-si-members
|
- id: get-si-members
|
||||||
name: Get simple-icons members
|
name: Get simple-icons members
|
||||||
run: |
|
run: |
|
||||||
members="$(curl -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --retry 5 -s https://api.github.com/orgs/simple-icons/members | jq .[].login | tr '\n' ',' | sed -e 's/"//g' -e 's/,$//')"
|
members="$(curl -H 'Authorization: Bearer ${{ steps.app-token.outputs.token }}' --retry 5 -s https://api.github.com/orgs/simple-icons/members | jq .[].login | tr '\n' ',' | sed -e 's/"//g' -e 's/,$//')"
|
||||||
echo "members=$members" >> $GITHUB_OUTPUT
|
echo "members=$members" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- id: get-linked-issues
|
- id: get-linked-issues
|
||||||
@ -56,6 +65,8 @@ jobs:
|
|||||||
- id: priority-1
|
- id: priority-1
|
||||||
name: Assign `update icon/data` pull requests to "Priority 1"
|
name: Assign `update icon/data` pull requests to "Priority 1"
|
||||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||||
|
env:
|
||||||
|
MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
if: contains(steps.get-labels.outputs.labels, 'update icon/data')
|
if: contains(steps.get-labels.outputs.labels, 'update icon/data')
|
||||||
with:
|
with:
|
||||||
project: https://github.com/orgs/simple-icons/projects/2
|
project: https://github.com/orgs/simple-icons/projects/2
|
||||||
@ -64,6 +75,8 @@ jobs:
|
|||||||
- id: priority-2
|
- id: priority-2
|
||||||
name: Assign `new icon` pull requests to "Priority 2"
|
name: Assign `new icon` pull requests to "Priority 2"
|
||||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||||
|
env:
|
||||||
|
MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
# the PR has the `new icon` label along with a linked issue and
|
# the PR has the `new icon` label along with a linked issue and
|
||||||
# the opener is not a member of simple-icons organization
|
# the opener is not a member of simple-icons organization
|
||||||
if: |
|
if: |
|
||||||
@ -77,6 +90,8 @@ jobs:
|
|||||||
- id: priority-3
|
- id: priority-3
|
||||||
name: Assign `new icon` pull requests by maintainers to "Priority 3"
|
name: Assign `new icon` pull requests by maintainers to "Priority 3"
|
||||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||||
|
env:
|
||||||
|
MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
# the PR has the `new icon` label along with a linked issue and
|
# the PR has the `new icon` label along with a linked issue and
|
||||||
# the opener is a member of the simple-icons organisation
|
# the opener is a member of the simple-icons organisation
|
||||||
if: |
|
if: |
|
||||||
@ -90,6 +105,8 @@ jobs:
|
|||||||
- id: priority-4
|
- id: priority-4
|
||||||
name: Assign `new icon` pull requests by maintainers without an issue to "Priority 4"
|
name: Assign `new icon` pull requests by maintainers without an issue to "Priority 4"
|
||||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||||
|
env:
|
||||||
|
MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
# the PR has the `new icon` label but with no linked issue and
|
# the PR has the `new icon` label but with no linked issue and
|
||||||
# the opener is a member of the simple-icons organisation
|
# the opener is a member of the simple-icons organisation
|
||||||
if: |
|
if: |
|
||||||
@ -102,6 +119,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Assign pull requests to "Unprioritised"
|
- name: Assign pull requests to "Unprioritised"
|
||||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||||
|
env:
|
||||||
|
MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
if: |
|
if: |
|
||||||
steps.priority-1.conclusion == 'skipped' &&
|
steps.priority-1.conclusion == 'skipped' &&
|
||||||
steps.priority-2.conclusion == 'skipped' &&
|
steps.priority-2.conclusion == 'skipped' &&
|
||||||
@ -117,11 +136,16 @@ jobs:
|
|||||||
if: |
|
if: |
|
||||||
github.event.action != 'opened' &&
|
github.event.action != 'opened' &&
|
||||||
github.event.pull_request.merged == false
|
github.event.pull_request.merged == false
|
||||||
env:
|
|
||||||
MY_GITHUB_TOKEN: ${{ secrets.AUTO_ASSIGN_WORKFLOW_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- name: Assign closed pull requests to "Completed or Abandoned"
|
- name: Assign closed pull requests to "Completed or Abandoned"
|
||||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||||
|
env:
|
||||||
|
MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
with:
|
with:
|
||||||
project: https://github.com/orgs/simple-icons/projects/2
|
project: https://github.com/orgs/simple-icons/projects/2
|
||||||
column_name: Completed or Abandoned
|
column_name: Completed or Abandoned
|
||||||
|
6
.github/workflows/autoclose-issues.yml
vendored
6
.github/workflows/autoclose-issues.yml
vendored
@ -8,6 +8,11 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- id: match-java
|
- id: match-java
|
||||||
@ -39,6 +44,7 @@ jobs:
|
|||||||
contains(steps.get-labels.outputs.labels, 'new icon')
|
contains(steps.get-labels.outputs.labels, 'new icon')
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
|
github-token: ${{ steps.app-token.outputs.token }}
|
||||||
script: |
|
script: |
|
||||||
github.rest.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
|
7
.github/workflows/create-release.yml
vendored
7
.github/workflows/create-release.yml
vendored
@ -34,11 +34,16 @@ jobs:
|
|||||||
github.event_name != 'push' &&
|
github.event_name != 'push' &&
|
||||||
needs.release-pr.outputs.did-create-pr == 'true'
|
needs.release-pr.outputs.did-create-pr == 'true'
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# Ensure the commit can be pushed regardless of branch protections (must belong to an admin of this repo)
|
# Ensure the commit can be pushed regardless of branch protections (must belong to an admin of this repo)
|
||||||
token: ${{ secrets.RELEASE_TOKEN }}
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
# Ensure we are checked out on the develop branch
|
# Ensure we are checked out on the develop branch
|
||||||
ref: develop
|
ref: develop
|
||||||
- name: Use Node.js 20.x
|
- name: Use Node.js 20.x
|
||||||
|
7
.github/workflows/merge-release.yml
vendored
7
.github/workflows/merge-release.yml
vendored
@ -8,6 +8,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: contains(github.event.pull_request.labels.*.name, 'release')
|
if: contains(github.event.pull_request.labels.*.name, 'release')
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- uses: simple-icons/release-action@v1
|
- uses: simple-icons/release-action@v1
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.RELEASE_TOKEN }}
|
repo-token: ${{ steps.app-token.outputs.token }}
|
||||||
|
7
.github/workflows/potential-duplicates.yml
vendored
7
.github/workflows/potential-duplicates.yml
vendored
@ -7,9 +7,14 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- uses: wow-actions/potential-duplicates@v1
|
- uses: wow-actions/potential-duplicates@v1
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
label: duplicate
|
label: duplicate
|
||||||
exclude: |
|
exclude: |
|
||||||
adding
|
adding
|
||||||
|
19
.github/workflows/publish.yml
vendored
19
.github/workflows/publish.yml
vendored
@ -57,6 +57,11 @@ jobs:
|
|||||||
needs: sanity-check
|
needs: sanity-check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Get commit message (for release title and body)
|
- name: Get commit message (for release title and body)
|
||||||
@ -94,10 +99,15 @@ jobs:
|
|||||||
needs: npm
|
needs: npm
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- name: Trigger simple-icons-font release
|
- name: Trigger simple-icons-font release
|
||||||
run: |
|
run: |
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: Bearer ${{ secrets.REMOTE_DISPATCH_TOKEN }}" \
|
-H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
|
||||||
-d '{"ref":"develop"}' \
|
-d '{"ref":"develop"}' \
|
||||||
https://api.github.com/repos/simple-icons/simple-icons-font/actions/workflows/auto-release.yml/dispatches
|
https://api.github.com/repos/simple-icons/simple-icons-font/actions/workflows/auto-release.yml/dispatches
|
||||||
website:
|
website:
|
||||||
@ -105,9 +115,14 @@ jobs:
|
|||||||
needs: npm
|
needs: npm
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- name: Trigger simple-icons-website update
|
- name: Trigger simple-icons-website update
|
||||||
run: |
|
run: |
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: Bearer ${{ secrets.REMOTE_DISPATCH_TOKEN }}" \
|
-H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
|
||||||
-d '{"ref":"master"}' \
|
-d '{"ref":"master"}' \
|
||||||
https://api.github.com/repos/simple-icons/simple-icons-website/actions/workflows/auto-release.yml/dispatches
|
https://api.github.com/repos/simple-icons/simple-icons-website/actions/workflows/auto-release.yml/dispatches
|
||||||
|
21
.github/workflows/remove-labels.yml
vendored
21
.github/workflows/remove-labels.yml
vendored
@ -13,9 +13,14 @@ jobs:
|
|||||||
if: github.event.pull_request.merged
|
if: github.event.pull_request.merged
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- uses: mondeja/remove-labels-gh-action@v2
|
- uses: mondeja/remove-labels-gh-action@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
labels: |
|
labels: |
|
||||||
assessing
|
assessing
|
||||||
awaiting reply
|
awaiting reply
|
||||||
@ -31,9 +36,14 @@ jobs:
|
|||||||
if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged)
|
if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- uses: mondeja/remove-labels-gh-action@v2
|
- uses: mondeja/remove-labels-gh-action@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
labels: |
|
labels: |
|
||||||
in discussion
|
in discussion
|
||||||
pending
|
pending
|
||||||
@ -43,9 +53,14 @@ jobs:
|
|||||||
if: github.event.issue.state == 'closed'
|
if: github.event.issue.state == 'closed'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||||
- uses: mondeja/remove-labels-gh-action@v2
|
- uses: mondeja/remove-labels-gh-action@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
labels: |
|
labels: |
|
||||||
in discussion
|
in discussion
|
||||||
pending
|
pending
|
||||||
|
Loading…
x
Reference in New Issue
Block a user