Skip to content

Commit b1fcee3

Browse files
fix: update workflow permissions and README link for exercise issue
1 parent ef1ebd4 commit b1fcee3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/start-exercise.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ on:
2020
value: ${{ jobs.create_exercise.outputs.issue-number }}
2121

2222
permissions:
23-
contents: write
24-
actions: write
25-
issues: write
23+
contents: write # Update Readme
24+
actions: write # Disable workflows
25+
issues: write # Create issue
2626

2727
jobs:
2828
disable_workflows:
@@ -59,7 +59,7 @@ jobs:
5959
with:
6060
repository: skills/exercise-toolkit
6161
path: exercise-toolkit
62-
ref: start-exercise-workflow
62+
ref: dev # TODO: Change to tag
6363

6464
- name: Build welcome message from template
6565
id: build-issue-description
@@ -88,9 +88,10 @@ jobs:
8888
ISSUE_BODY: ${{ steps.build-issue-description.outputs.updated-text }}
8989
EXERCISE_TITLE: ${{ inputs.exercise-title }}
9090

91-
update_readme_buttons:
92-
name: Update README Buttons
91+
update_readme:
92+
name: Update README
9393
runs-on: ubuntu-latest
94+
needs: create_exercise
9495

9596
steps:
9697
- uses: actions/checkout@v4
@@ -111,7 +112,7 @@ jobs:
111112
run: |
112113
# Add link to issue
113114
target='id="start-exercise"'
114-
replacement='id="start-exercise" href="../../issues/1"'
115+
replacement='id="start-exercise" href="../../issues/${{ needs.create_exercise.outputs.issue-number }}"'
115116
sed -i "s|$target|$replacement|g" README.md
116117
117118
# Change color from gray to green

0 commit comments

Comments
 (0)