Skip to content

Commit 9183eeb

Browse files
author
asyncapi-bot
committed
ci: update of files from global .github repo
1 parent e5b0d1a commit 9183eeb

File tree

6 files changed

+67
-33
lines changed

6 files changed

+67
-33
lines changed

.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Add ready-to-merge label
29-
uses: actions/github-script@v6
29+
uses: actions/github-script@v7
30+
env:
31+
GITHUB_ACTOR: ${{ github.actor }}
3032
with:
3133
github-token: ${{ secrets.GH_TOKEN }}
3234
script: |
@@ -56,7 +58,7 @@ jobs:
5658
issue_number: context.issue.number,
5759
owner: context.repo.owner,
5860
repo: context.repo.repo,
59-
body: `Hello, @${{ github.actor }}! 👋🏼
61+
body: `Hello, @${process.env.GITHUB_ACTOR}! 👋🏼
6062
This PR is not up to date with the base branch and can't be merged.
6163
Please update your branch manually with the latest version of the base branch.
6264
PRO-TIP: To request an update from the upstream branch, simply comment \`/u\` or \`/update\` and our bot will handle the update operation promptly.
@@ -78,7 +80,7 @@ jobs:
7880
runs-on: ubuntu-latest
7981
steps:
8082
- name: Add do-not-merge label
81-
uses: actions/github-script@v6
83+
uses: actions/github-script@v7
8284
with:
8385
github-token: ${{ secrets.GH_TOKEN }}
8486
script: |
@@ -100,7 +102,7 @@ jobs:
100102
runs-on: ubuntu-latest
101103
steps:
102104
- name: Add autoupdate label
103-
uses: actions/github-script@v6
105+
uses: actions/github-script@v7
104106
with:
105107
github-token: ${{ secrets.GH_TOKEN }}
106108
script: |

.github/workflows/bounty-program-commands.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ jobs:
3232

3333
steps:
3434
- name: ❌ @${{github.actor}} made an unauthorized attempt to use a Bounty Program's command
35-
uses: actions/github-script@v6
36-
35+
uses: actions/github-script@v7
36+
env:
37+
ACTOR: ${{ github.actor }}
3738
with:
3839
github-token: ${{ secrets.GH_TOKEN }}
3940
script: |
40-
const commentText = `❌ @${{github.actor}} is not authorized to use the Bounty Program's commands.
41+
const commentText = `❌ @${process.env.ACTOR} is not authorized to use the Bounty Program's commands.
4142
These commands can only be used by members of the [Bounty Team](https://github.com/orgs/asyncapi/teams/bounty_team).`;
4243
43-
console.log(`❌ @${{github.actor}} made an unauthorized attempt to use a Bounty Program's command.`);
44+
console.log(`❌ @${process.env.ACTOR} made an unauthorized attempt to use a Bounty Program's command.`);
4445
github.rest.issues.createComment({
4546
issue_number: context.issue.number,
4647
owner: context.repo.owner,
@@ -59,8 +60,7 @@ jobs:
5960

6061
steps:
6162
- name: Add label `bounty`
62-
uses: actions/github-script@v6
63-
63+
uses: actions/github-script@v7
6464
with:
6565
github-token: ${{ secrets.GH_TOKEN }}
6666
script: |
@@ -101,8 +101,7 @@ jobs:
101101

102102
steps:
103103
- name: Remove label `bounty`
104-
uses: actions/github-script@v6
105-
104+
uses: actions/github-script@v7
106105
with:
107106
github-token: ${{ secrets.GH_TOKEN }}
108107
script: |

.github/workflows/help-command.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
steps:
1616
- name: Add comment to PR
1717
uses: actions/github-script@v7
18+
env:
19+
ACTOR: ${{ github.actor }}
1820
with:
1921
github-token: ${{ secrets.GH_TOKEN }}
2022
script: |
@@ -25,7 +27,7 @@ jobs:
2527
issue_number: context.issue.number,
2628
owner: context.repo.owner,
2729
repo: context.repo.repo,
28-
body: `Hello, @${{ github.actor }}! 👋🏼
30+
body: `Hello, @${process.env.ACTOR}! 👋🏼
2931
3032
I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!
3133
@@ -44,14 +46,16 @@ jobs:
4446
steps:
4547
- name: Add comment to Issue
4648
uses: actions/github-script@v7
49+
env:
50+
ACTOR: ${{ github.actor }}
4751
with:
4852
github-token: ${{ secrets.GH_TOKEN }}
4953
script: |
5054
github.rest.issues.createComment({
5155
issue_number: context.issue.number,
5256
owner: context.repo.owner,
5357
repo: context.repo.repo,
54-
body: `Hello, @${{ github.actor }}! 👋🏼
58+
body: `Hello, @${process.env.ACTOR}! 👋🏼
5559
5660
I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!
5761

.github/workflows/issues-prs-notifications.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ jobs:
2323
- name: Convert markdown to slack markdown for issue
2424
uses: asyncapi/.github/.github/actions/slackify-markdown@master
2525
id: issuemarkdown
26+
env:
27+
ISSUE_TITLE: ${{github.event.issue.title}}
28+
ISSUE_URL: ${{github.event.issue.html_url}}
29+
ISSUE_BODY: ${{github.event.issue.body}}
2630
with:
27-
markdown: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}"
31+
markdown: "[${{ env.ISSUE_TITLE }}](${{ env.ISSUE_URL }}) \n ${{ env.ISSUE_BODY }}"
2832
- name: Send info about issue
29-
uses: rtCamp/action-slack-notify@v2
33+
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
3034
env:
3135
SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
3236
SLACK_TITLE: 🐛 New Issue in ${{github.repository}} 🐛
@@ -41,10 +45,14 @@ jobs:
4145
- name: Convert markdown to slack markdown for pull request
4246
uses: asyncapi/.github/.github/actions/slackify-markdown@master
4347
id: prmarkdown
48+
env:
49+
PR_TITLE: ${{github.event.pull_request.title}}
50+
PR_URL: ${{github.event.pull_request.html_url}}
51+
PR_BODY: ${{github.event.pull_request.body}}
4452
with:
45-
markdown: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}"
53+
markdown: "[${{ env.PR_TITLE }}](${{ env.PR_URL }}) \n ${{ env.PR_BODY }}"
4654
- name: Send info about pull request
47-
uses: rtCamp/action-slack-notify@v2
55+
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
4856
env:
4957
SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
5058
SLACK_TITLE: 💪 New Pull Request in ${{github.repository}} 💪
@@ -59,10 +67,14 @@ jobs:
5967
- name: Convert markdown to slack markdown for pull request
6068
uses: asyncapi/.github/.github/actions/slackify-markdown@master
6169
id: discussionmarkdown
70+
env:
71+
DISCUSSION_TITLE: ${{github.event.discussion.title}}
72+
DISCUSSION_URL: ${{github.event.discussion.html_url}}
73+
DISCUSSION_BODY: ${{github.event.discussion.body}}
6274
with:
63-
markdown: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}"
75+
markdown: "[${{ env.DISCUSSION_TITLE }}](${{ env.DISCUSSION_URL }}) \n ${{ env.DISCUSSION_BODY }}"
6476
- name: Send info about pull request
65-
uses: rtCamp/action-slack-notify@v2
77+
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
6678
env:
6779
SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
6880
SLACK_TITLE: 💬 New Discussion in ${{github.repository}} 💬

.github/workflows/release-announcements.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,34 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
- name: Convert markdown to slack markdown for issue
2020
uses: asyncapi/.github/.github/actions/slackify-markdown@master
2121
id: markdown
22+
env:
23+
RELEASE_TAG: ${{github.event.release.tag_name}}
24+
RELEASE_URL: ${{github.event.release.html_url}}
25+
RELEASE_BODY: ${{ github.event.release.body }}
2226
with:
23-
markdown: "[${{github.event.release.tag_name}}](${{github.event.release.html_url}}) \n ${{ github.event.release.body }}"
27+
markdown: "[${{ env.RELEASE_TAG }}](${{ env.RELEASE_URL }}) \n ${{ env.RELEASE_BODY }}"
2428
- name: Send info about release to Slack
25-
uses: rtCamp/action-slack-notify@v2
29+
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
2630
env:
2731
SLACK_WEBHOOK: ${{ secrets.SLACK_RELEASES }}
28-
SLACK_TITLE: Release ${{github.event.release.tag_name}} for ${{github.repository}} is out in the wild 😱💪🍾🎂
32+
SLACK_TITLE: Release ${{ env.RELEASE_TAG }} for ${{ env.REPO_NAME }} is out in the wild 😱💪🍾🎂
2933
SLACK_MESSAGE: ${{steps.markdown.outputs.text}}
3034
MSG_MINIMAL: true
35+
RELEASE_TAG: ${{github.event.release.tag_name}}
36+
REPO_NAME: ${{github.repository}}
3137

3238
twitter-announce:
3339
name: Twitter - notify on minor and major releases
3440
runs-on: ubuntu-latest
3541
steps:
3642
- name: Checkout repo
37-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
3844
- name: Get version of last and previous release
39-
uses: actions/github-script@v6
45+
uses: actions/github-script@v7
4046
id: versions
4147
with:
4248
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -62,17 +68,27 @@ jobs:
6268
- name: Identify release type
6369
id: releasetype
6470
# if previousver is not provided then this steps just logs information about missing version, no errors
65-
run: echo "type=$(npx -q -p semver-diff-cli semver-diff ${{steps.versions.outputs.previousver}} ${{steps.versions.outputs.lastver}})" >> $GITHUB_OUTPUT
71+
env:
72+
PREV_VERSION: ${{steps.versions.outputs.previousver}}
73+
LAST_VERSION: ${{steps.versions.outputs.lastver}}
74+
run: echo "type=$(npx -q -p semver-diff-cli semver-diff "$PREV_VERSION" "$LAST_VERSION")" >> $GITHUB_OUTPUT
6675
- name: Get name of the person that is behind the newly released version
6776
id: author
68-
run: echo "name=$(git log -1 --pretty=format:'%an')" >> $GITHUB_OUTPUT
77+
run: |
78+
AUTHOR_NAME=$(git log -1 --pretty=format:'%an')
79+
printf 'name=%s\n' "$AUTHOR_NAME" >> $GITHUB_OUTPUT
6980
- name: Publish information about the release to Twitter # tweet only if detected version change is not a patch
7081
# tweet goes out even if the type is not major or minor but "You need provide version number to compare."
7182
# it is ok, it just means we did not identify previous version as we are tweeting out information about the release for the first time
7283
if: steps.releasetype.outputs.type != 'null' && steps.releasetype.outputs.type != 'patch' # null means that versions are the same
7384
uses: m1ner79/Github-Twittction@d1e508b6c2170145127138f93c49b7c46c6ff3a7 # using 2.0.0 https://github.com/m1ner79/Github-Twittction/releases/tag/v2.0.0
85+
env:
86+
RELEASE_TAG: ${{github.event.release.tag_name}}
87+
REPO_NAME: ${{github.repository}}
88+
AUTHOR_NAME: ${{ steps.author.outputs.name }}
89+
RELEASE_URL: ${{github.event.release.html_url}}
7490
with:
75-
twitter_status: "Release ${{github.event.release.tag_name}} for ${{github.repository}} is out in the wild 😱💪🍾🎂\n\nThank you for the contribution ${{ steps.author.outputs.name }} ${{github.event.release.html_url}}"
91+
twitter_status: "Release ${{ env.RELEASE_TAG }} for ${{ env.REPO_NAME }} is out in the wild 😱💪🍾🎂\n\nThank you for the contribution ${{ env.AUTHOR_NAME }} ${{ env.RELEASE_URL }}"
7692
twitter_consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }}
7793
twitter_consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
7894
twitter_access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}

.github/workflows/transfer-issue.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
env:
2424
COMMENT: "${{ github.event.comment.body }}"
2525
run: |
26-
REPO=$(echo $COMMENT | awk '{print $2}')
27-
echo repo=$REPO >> $GITHUB_OUTPUT
26+
REPO=$(echo "$COMMENT" | awk '{print $2}')
27+
echo "repo=$REPO" >> $GITHUB_OUTPUT
2828
- name: Check Repo
2929
uses: actions/github-script@v7
3030
with:
@@ -55,7 +55,8 @@ jobs:
5555
id: transferIssue
5656
working-directory: ./
5757
run: |
58-
gh issue transfer ${{github.event.issue.number}} asyncapi/${{steps.extract_step.outputs.repo}}
58+
gh issue transfer "$ISSUE_NUMBER" "asyncapi/$REPO_NAME"
5959
env:
6060
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61-
61+
ISSUE_NUMBER: ${{ github.event.issue.number }}
62+
REPO_NAME: ${{ steps.extract_step.outputs.repo }}

0 commit comments

Comments
 (0)