Skip to content

Commit 47ff652

Browse files
committed
make staged files uniuqe for this exercise
1 parent 45cddc3 commit 47ff652

File tree

7 files changed

+13
-44
lines changed

7 files changed

+13
-44
lines changed

.github/actions/local-action/dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ module.exports = async () => {
262262
const { GITHUB_WORKSPACE } = process.env;
263263
// read a file from the workspace
264264
const file = fs.readFileSync(
265-
`${GITHUB_WORKSPACE}/codeql-analysis.yml`,
265+
`${GITHUB_WORKSPACE}/.github/workflows/codeql-analysis.yml`,
266266
"utf8"
267267
);
268268

.github/actions/local-action/lib/gradeLearner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = async () => {
55
const { GITHUB_WORKSPACE } = process.env;
66
// read a file from the workspace
77
const file = fs.readFileSync(
8-
`${GITHUB_WORKSPACE}/codeql-analysis.yml`,
8+
`${GITHUB_WORKSPACE}/.github/workflows/codeql-analysis.yml`,
99
"utf8"
1010
);
1111

.github/workflows/CI.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/grading.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Grading workflow
2-
on: push
2+
on:
3+
push:
4+
paths:
5+
- .github/workflows/codeql-analysis.yml
6+
workflow_dispatch:
37

48
jobs:
59
grade-learner:
@@ -11,8 +15,6 @@ jobs:
1115
- name: Grade exercise-enable-code-scanning-using-codeql activity
1216
id: events
1317
uses: ./.github/actions/local-action
14-
with:
15-
github-token: ${{secrets.GITHUB_TOKEN}}
1618

1719
- name: Grading results
1820
uses: githubtraining/[email protected]

.github/workflows/setup.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

gitignore renamed to .gitignore

File renamed without changes.

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ A grading script exists under `.github/workflows/grading.yml`. You do not need t
1616
1717
<!-- OPTIONAL, only required for exercises that use PATs
1818
<details><summary>:closed_lock_with_key: About the use of secrets and access tokens in this exercise.</summary>
19-
19+
2020
> This exercise asks you to create a personal access token (PAT). This step is a prerequisite of the exercise, and you should already be comfortable with PATs on GitHub before proceeding. The PAT is encrypted and used only by a local action that does not leave your repository. GitHub has safeguards in place if the PAT is exposed by mistake, but you should know that if someone gains access to your PAT, they would have the same access you've given the token. To be safe, we recommend setting an expiration for the token. If you'd like to learn more about how your PAT is used, check the action's documentation in [`.github/actions/`](.github/actions/), [Creating a personal access token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token), and [Available scopes](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes).
2121
2222
</details>
2323
-->
2424

2525
<!-- OPTIONAL, only required for exercises that use orgs
2626
<details><summary> 👥 About the use of organizations in this exercise</summary>
27-
28-
> This exercise needs to be completed in an organization. We recommend you [create a new organization](https://github.com/account/organizations/new?coupon=&plan=team_free) for free. If you choose to use an existing organization, note that this exercise will ask you to adjust settings in the organization that may have unintended effects on existing repositories or organization members.
27+
28+
> This exercise needs to be completed in an organization. We recommend you [create a new organization](https://github.com/account/organizations/new?coupon=&plan=team_free) for free. If you choose to use an existing organization, note that this exercise will ask you to adjust settings in the organization that may have unintended effects on existing repositories or organization members.
2929
</details>
3030
-->
3131

@@ -39,6 +39,8 @@ Please complete the instructions below:
3939

4040
<!-- Add your steps below starting with step 2 -->
4141

42+
**Add the GitHub starter workflow for CodeQL Analysis**
43+
4244
## Useful resources
4345

4446
Use these resources specific to this exercise to help you!
@@ -64,4 +66,4 @@ If you are stuck with a step in the exercise or the grading workflow does not au
6466

6567
The troubleshooter will either display useful information to help you understand what you might have done wrong in your exercise or redirect you to the documentation relevant to your exercise to help you out.
6668

67-
See [Running a workflow on GitHub](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow#running-a-workflow) if you need assistance.
69+
See [Running a workflow on GitHub](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow#running-a-workflow) if you need assistance.

0 commit comments

Comments
 (0)