Skip to content

Commit 3a0bf65

Browse files
committed
debugging workflow
Signed-off-by: Ankita Sahu <[email protected]>
1 parent 31e0f82 commit 3a0bf65

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/feature-list.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
- cron: '0 0 * * *' # Run every night at midnight UTC
66
workflow_dispatch:
77

8+
permissions:
9+
contents: write
10+
actions: write
11+
812
jobs:
913
check-and-update-features:
1014
runs-on: ubuntu-latest
@@ -17,9 +21,8 @@ jobs:
1721

1822
- name: Check for updates in source repository
1923
id: check-updates
20-
uses: actions/github-script@v6
24+
uses: actions/github-script@v7
2125
with:
22-
github-token: ${{secrets.GH_ACCESS_TOKEN}}
2326
script: |
2427
const { data: sourceFile } = await github.rest.repos.getContent({
2528
owner: 'layer5labs',
@@ -62,12 +65,14 @@ jobs:
6265
6366
// Write the new content
6467
fs.writeFileSync('${{ env.FEATURES_FILE }}', content);
68+
69+
core.setOutput('has-updates', 'true');
70+
} else {
71+
core.setOutput('has-updates', 'false');
6572
}
66-
67-
return hasUpdates;
6873
6974
- name: Commit changes
70-
if: steps.check-updates.outputs.result == 'true'
75+
if: steps.check-updates.outputs.has-updates == 'true'
7176
uses: stefanzweifel/git-auto-commit-action@v5
7277
with:
7378
commit_message: "Updated feature data from source repository"

0 commit comments

Comments
 (0)