File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 5
5
- cron : ' 0 0 * * *' # Run every night at midnight UTC
6
6
workflow_dispatch :
7
7
8
+ permissions :
9
+ contents : write
10
+ actions : write
11
+
8
12
jobs :
9
13
check-and-update-features :
10
14
runs-on : ubuntu-latest
17
21
18
22
- name : Check for updates in source repository
19
23
id : check-updates
20
- uses : actions/github-script@v6
24
+ uses : actions/github-script@v7
21
25
with :
22
- github-token : ${{secrets.GH_ACCESS_TOKEN}}
23
26
script : |
24
27
const { data: sourceFile } = await github.rest.repos.getContent({
25
28
owner: 'layer5labs',
@@ -62,12 +65,14 @@ jobs:
62
65
63
66
// Write the new content
64
67
fs.writeFileSync('${{ env.FEATURES_FILE }}', content);
68
+
69
+ core.setOutput('has-updates', 'true');
70
+ } else {
71
+ core.setOutput('has-updates', 'false');
65
72
}
66
-
67
- return hasUpdates;
68
73
69
74
- name : Commit changes
70
- if : steps.check-updates.outputs.result == 'true'
75
+ if : steps.check-updates.outputs.has-updates == 'true'
71
76
uses : stefanzweifel/git-auto-commit-action@v5
72
77
with :
73
78
commit_message : " Updated feature data from source repository"
You can’t perform that action at this time.
0 commit comments