File tree Expand file tree Collapse file tree 6 files changed +103
-120
lines changed
actions/update-devcontainer-hash
actions/update-devcontainer-hash Expand file tree Collapse file tree 6 files changed +103
-120
lines changed Original file line number Diff line number Diff line change 11# Changes here will be overwritten by Copier
2- _commit : v0.0.41-2-g01ccd8c
2+ _commit : v0.0.41-10-g38b62f8
33_src_path : gh:LabAutomationAndScreening/copier-base-template.git
44description : Copier template for creating Python libraries and executables
55python_ci_versions :
Original file line number Diff line number Diff line change 1+ name : Update Devcontainer Hash
2+
3+ inputs :
4+ branch :
5+ description : ' Branch to checkout and update'
6+ required : true
7+
8+ permissions :
9+ contents : write
10+
11+
12+ runs :
13+ using : composite
14+ steps :
15+ - name : Verify Dependabot actor
16+ if : ${{ github.actor != 'dependabot[bot]' }}
17+ run : |
18+ echo "Action can only be run by dependabot[bot], but was invoked by ${GITHUB_ACTOR}." >&2
19+ exit 1
20+
21+ - name : Checkout code
22+ uses : actions/checkout@v4.2.2
23+ with :
24+ persist-credentials : true
25+ fetch-depth : 1
26+ ref : ${{ inputs.branch }}
27+
28+ - name : Configure Git author
29+ run : |
30+ git config user.name "github-actions[bot]"
31+ git config user.email "github-actions[bot]@users.noreply.github.com"
32+
33+ - name : Update devcontainer hash
34+ run : |
35+ python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update --exit-zero
36+
37+ - name : Commit & push changes
38+ run : |
39+ if ! git diff --quiet; then
40+ git add .
41+ git commit -m "chore: update devcontainer hash [dependabot skip]"
42+ git push origin HEAD:${{ inputs.branch }}
43+ else
44+ echo "No changes to commit"
45+ fi
Original file line number Diff line number Diff line change 55 branches-ignore :
66 - ' gh-readonly-queue/**' # don't run (again) when on these special branches created during merge groups; the `on: merge_group` already triggers it.
77 merge_group :
8- workflow_dispatch :
98
109env :
1110 PYTHONUNBUFFERED : True
@@ -16,7 +15,17 @@ permissions:
1615 contents : write # needed for mutex
1716
1817jobs :
18+ get-values :
19+ runs-on : ubuntu-24.04
20+ steps :
21+ - name : Update Devcontainer Hash
22+ if : ${{ github.actor == 'dependabot[bot]' }}
23+ uses : ./.github/actions/update-devcontainer-hash
24+ with :
25+ branch : ${{ github.ref_name }}
26+
1927 pre-commit :
28+ needs : [ get-values ]
2029 strategy :
2130 fail-fast : false
2231 matrix :
2938 steps :
3039 - name : Checkout code
3140 uses : actions/checkout@v4.2.2
41+ with :
42+ ref : ${{ github.ref_name }} # explicitly get the head of
3243
3344
3445
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Update Devcontainer Hash
2+
3+ inputs :
4+ branch :
5+ description : ' Branch to checkout and update'
6+ required : true
7+
8+ permissions :
9+ contents : write
10+
11+
12+ runs :
13+ using : composite
14+ steps :
15+ - name : Verify Dependabot actor
16+ if : ${{ github.actor != 'dependabot[bot]' }}
17+ run : |
18+ echo "Action can only be run by dependabot[bot], but was invoked by ${GITHUB_ACTOR}." >&2
19+ exit 1
20+
21+ - name : Checkout code
22+ uses : actions/checkout@v4.2.2
23+ with :
24+ persist-credentials : true
25+ fetch-depth : 1
26+ ref : ${{ inputs.branch }}
27+
28+ - name : Configure Git author
29+ run : |
30+ git config user.name "github-actions[bot]"
31+ git config user.email "github-actions[bot]@users.noreply.github.com"
32+
33+ - name : Update devcontainer hash
34+ run : |
35+ python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update --exit-zero
36+
37+ - name : Commit & push changes
38+ run : |
39+ if ! git diff --quiet; then
40+ git add .
41+ git commit -m "chore: update devcontainer hash [dependabot skip]"
42+ git push origin HEAD:${{ inputs.branch }}
43+ else
44+ echo "No changes to commit"
45+ fi
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments