Skip to content

Commit f0e5f83

Browse files
locus313Copilot
andcommitted
chore: update actions/checkout to v7 and auto-maintain README SHA
- Update all actions/checkout references in README from v4 to v7.0.0 pinned to commit SHA 9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 - Replace mutable 'ref: main' in usage example with pinned commit SHA - Add workflow to auto-update pinned SHA in README on every push to main - Update CHANGELOG Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1325656 commit f0e5f83

3 files changed

Lines changed: 56 additions & 17 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update README SHA reference
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'README.md'
9+
- '**.md'
10+
- 'LICENSE'
11+
- '.github/FUNDING.yml'
12+
13+
jobs:
14+
update-sha:
15+
name: Update pinned SHA in README
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
22+
with:
23+
ref: main
24+
fetch-depth: 2
25+
26+
- name: Update SHA in README.md
27+
run: |
28+
NEW_SHA="${{ github.sha }}"
29+
sed -i "s|ref: [0-9a-f]\{40\}|ref: ${NEW_SHA}|g" README.md
30+
31+
- name: Commit updated README.md
32+
run: |
33+
git config user.name "github-actions[bot]"
34+
git config user.email "github-actions[bot]@users.noreply.github.com"
35+
if git diff --quiet README.md; then
36+
echo "No SHA change detected, skipping commit."
37+
else
38+
git add README.md
39+
git commit -m "chore: update pinned SHA in README to ${{ github.sha }}"
40+
git push
41+
fi

CHANGELOG.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77
## [Unreleased]
88

99
### Added
10-
- `AGENTS.md` — AI agent guide with project overview, directory map, build/run, key patterns, and adding-a-new-script walkthrough
11-
- `.github/workflows/ci.yml` — shellcheck CI on all `.sh` files for every PR
12-
- `.github/workflows/copilot-setup-steps.yml` — pre-installs jq, shellcheck, and gitleaks for Copilot cloud agent
13-
- `.github/ISSUE_TEMPLATE/bug_report.yml` — structured bug report form
14-
- `.github/ISSUE_TEMPLATE/feature_request.yml` — structured feature request form
15-
- `.github/PULL_REQUEST_TEMPLATE.md` — PR checklist derived from script conventions
16-
- `.github/dependabot.yml` — monthly GitHub Actions version updates
17-
- `.mcp.json` — GitHub MCP server configuration for Copilot CLI
18-
- Maintenance matrix section in `.github/copilot-instructions.md`
10+
- `github-copilot-report`: NDJSON usage-metrics endpoints, Entra ID enrichment via `az rest`, auto-detection of credits per seat with promo/standard table, `--no-entra` flag
11+
- README: GitHub Actions integration examples (workflow_dispatch, artifact upload, environment protection)
12+
- `.github/workflows/update-readme-sha.yml` — automatically updates the pinned commit SHA in README.md on every push to `main`
13+
14+
### Changed
15+
- README: updated all `actions/checkout` references from `v4` to `v7.0.0` (pinned SHA `9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0`)
16+
- README: replaced `ref: main` in the GitHub Actions usage example with a pinned commit SHA, and updated the accompanying note to recommend SHA pinning
1917

2018
---
2119

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -853,15 +853,15 @@ You can use these scripts in your own repository's workflows without copying or
853853

854854
```yaml
855855
- name: Checkout github-api-scripts
856-
uses: actions/checkout@v4
856+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
857857
with:
858858
repository: locus313/github-api-scripts
859-
ref: main # Pin to a specific tag or SHA in production
859+
ref: 1325656e2dad4f6b16b183cdd3676e05f00cb2b4
860860
path: github-api-scripts
861861
```
862862
863863
> [!NOTE]
864-
> For production workflows, pin `ref` to a specific tag (e.g., `v1.0.0`) or commit SHA rather than a branch name to ensure reproducibility and prevent unexpected changes.
864+
> For production workflows, pin `ref` to a specific commit SHA rather than a branch name to ensure reproducibility and prevent unexpected changes.
865865

866866
---
867867

@@ -882,7 +882,7 @@ jobs:
882882
runs-on: ubuntu-latest
883883
steps:
884884
- name: Checkout github-api-scripts
885-
uses: actions/checkout@v4
885+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
886886
with:
887887
repository: locus313/github-api-scripts
888888
ref: main
@@ -914,7 +914,7 @@ jobs:
914914
runs-on: ubuntu-latest
915915
steps:
916916
- name: Checkout github-api-scripts
917-
uses: actions/checkout@v4
917+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
918918
with:
919919
repository: locus313/github-api-scripts
920920
ref: main
@@ -960,7 +960,7 @@ jobs:
960960
runs-on: ubuntu-latest
961961
steps:
962962
- name: Checkout github-api-scripts
963-
uses: actions/checkout@v4
963+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
964964
with:
965965
repository: locus313/github-api-scripts
966966
ref: main
@@ -1000,10 +1000,10 @@ jobs:
10001000
runs-on: ubuntu-latest
10011001
steps:
10021002
- name: Checkout your repository
1003-
uses: actions/checkout@v4
1003+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
10041004
10051005
- name: Checkout github-api-scripts
1006-
uses: actions/checkout@v4
1006+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
10071007
with:
10081008
repository: locus313/github-api-scripts
10091009
ref: main

0 commit comments

Comments
 (0)