Skip to content

Commit 9dbdeb7

Browse files
feat: add script context logging (#26)
<!-- markdownlint-disable MD041 --> ## 💌 Description - add script context logging - ci maintenance: pin sha ## 🔗 Related issue <!-- If your PR refers to a related issue, link it here. --> Fixes: # ## 📚 Type of change <!-- Mark with an `x` all the checkboxes that apply (like `[x]`) --> - [ ] 📝 Examples / docs / tutorials - [ ] 🐛 Bug fix (non-breaking change which fixes an issue) - [x] 🥂 Improvement (non-breaking change which improves an existing feature) - [x] ✨ New feature (non-breaking change which adds functionality) - [ ] 💥 Breaking change (fix or feature that would cause existing functionality to change) - [ ] 🚨 Security fix - [ ] ⬆️ Dependencies update ## ✔️ Checklist <!-- Mark with an `x` all the checkboxes that apply (like `[x]`) --> - [x] I've read the [`Code of Conduct`](https://github.com/raven-actions/.workflows/blob/main/.github/CODE_OF_CONDUCT.md) document. - [x] I've read the [`Contributing`](https://github.com/raven-actions/.workflows/blob/main/.github/CONTRIBUTING.md) guide. --------- Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
1 parent 7d58e2a commit 9dbdeb7

File tree

6 files changed

+29
-23
lines changed

6 files changed

+29
-23
lines changed

.github/linters/.cspell.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ words:
1515
- codespell
1616
- MYENVPREFIX
1717
- stefanzweifel
18+
- SMEE
19+
- smee

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ jobs:
4545
pull-requests: read
4646
steps:
4747
- name: Checkout
48-
uses: actions/checkout@v5
48+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4949

5050
- name: Detect changes
51-
uses: dorny/paths-filter@v3
51+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
5252
id: changes
5353
with:
5454
filters: |
@@ -59,7 +59,7 @@ jobs:
5959
6060
- name: actionlint
6161
if: ${{ steps.changes.outputs.gh-workflows == 'true' }}
62-
uses: raven-actions/actionlint@v2
62+
uses: raven-actions/actionlint@3a24062651993d40fed1019b58ac6fbdfbf276cc # v2.0.1
6363
with:
6464
flags: "-ignore SC2086"
6565

@@ -74,7 +74,7 @@ jobs:
7474
runs-on: ubuntu-latest
7575
steps:
7676
- name: Checkout
77-
uses: actions/checkout@v5
77+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7878

7979
- name: Debug Action (inputs)
8080
id: debug
@@ -117,7 +117,7 @@ jobs:
117117
runs-on: ${{ matrix.os }}
118118
steps:
119119
- name: Checkout
120-
uses: actions/checkout@v5
120+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
121121

122122
- name: Debug Action
123123
uses: ./

.github/workflows/release-draft.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,20 @@ jobs:
1818
pull-requests: read
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Get GitHub App Token
22-
uses: wow-actions/use-app-token@v2
21+
- name: Get Token
22+
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
2323
id: get-token
2424
with:
25-
app_id: ${{ secrets.ORG_BOT_APP_ID }}
26-
private_key: ${{ secrets.ORG_BOT_PRIVATE_KEY }}
27-
fallback: ${{ github.token }}
25+
app-id: ${{ secrets.ORG_BOT_APP_ID }}
26+
private-key: ${{ secrets.ORG_BOT_PRIVATE_KEY }}
2827

2928
- name: Run Release Drafter
30-
uses: release-drafter/release-drafter@v6
29+
uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
3130
id: release-drafter
3231
with:
3332
prerelease: true
3433
env:
35-
GITHUB_TOKEN: ${{ steps.get-token.outputs.BOT_TOKEN }}
34+
GITHUB_TOKEN: ${{ steps.get-token.outputs.token }}
3635

3736
- name: Get Release URL
3837
run: |

.github/workflows/release.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,23 @@ jobs:
2121
contents: write
2222
runs-on: ubuntu-latest
2323
steps:
24-
- name: Get GitHub App Token
25-
uses: wow-actions/use-app-token@v2
24+
- name: Get Token
25+
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
2626
id: get-token
2727
with:
28-
app_id: ${{ secrets.ORG_BOT_APP_ID }}
29-
private_key: ${{ secrets.ORG_BOT_PRIVATE_KEY }}
30-
fallback: ${{ github.token }}
28+
app-id: ${{ secrets.ORG_BOT_APP_ID }}
29+
private-key: ${{ secrets.ORG_BOT_PRIVATE_KEY }}
3130

3231
- name: Update release to the latest
3332
id: gh-release
34-
uses: softprops/action-gh-release@v2
33+
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
3534
with:
3635
prerelease: false
37-
token: ${{ steps.get-token.outputs.BOT_TOKEN }}
36+
token: ${{ steps.get-token.outputs.token }}
3837

3938
- name: Update the major tag to include the ${{ env.TAG_NAME }} changes
4039
id: update-major-tag
41-
uses: actions/publish-action@v0.3.0
40+
uses: actions/publish-action@f784495ce78a41bac4ed7e34a73f0034015764bb # v0.3.0
4241
with:
4342
source-tag: ${{ env.TAG_NAME }}
44-
token: ${{ steps.get-token.outputs.BOT_TOKEN }}
43+
token: ${{ steps.get-token.outputs.token }}

.lycheeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ https://github.com/marketplace/actions/publish-and-tag
77
https://github.com/raven-actions/test/releases/v1.2.3
88

99
https://aquasecurity.github.io/trivy-repo/deb
10+
https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ outputs:
4444
runs:
4545
using: composite
4646
steps:
47-
- uses: actions/github-script@v7
47+
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
4848
if: ${{ always() }}
4949
with:
5050
script: |
@@ -80,6 +80,11 @@ runs:
8080
core.info(jsonLogOutput(envVars, false))
8181
})
8282
83+
// script context
84+
await core.group(groupHeader('Script (context)'), async () => {
85+
core.info(jsonLogOutput(context, false))
86+
})
87+
8388
// github context
8489
await core.group(groupHeader('GitHub (github context)'), async () => {
8590
core.info(jsonLogOutput(process.env.ACTION_DUMP_CONTEXT_GITHUB))
@@ -256,7 +261,7 @@ runs:
256261
ACTION_DUMP_CONTEXT_NEEDS: ${{ inputs.needs-context }}
257262
ACTION_DUMP_CONTEXT_INPUTS: ${{ inputs.inputs-context }}
258263

259-
- uses: actions/github-script@v7
264+
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
260265
if: ${{ inputs.smee == 'true' }}
261266
id: smee
262267
with:

0 commit comments

Comments
 (0)