Skip to content

Commit a3b2ff4

Browse files
committed
ci: add sha test
1 parent d970249 commit a3b2ff4

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/test-ref.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@ jobs:
2020
echo "$REUSABLE_WORKFLOW_REF (REUSABLE_WORKFLOW_REF) != refs/heads/main"
2121
exit 1
2222
fi
23+
24+
if [[ "$REUSABLE_WORKFLOW_SHA" == "" ]]; then
25+
echo "$REUSABLE_WORKFLOW_SHA (REUSABLE_WORKFLOW_SHA) == ''"
26+
exit 1
27+
fi

.github/workflows/test-sha.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test (sha)
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
jobs:
8+
reusable:
9+
uses: ipdxco/reusable-workflow-context/.github/workflows/reusable.yml@d97024948175c71109e17aa55e62ff0bc9517fa0
10+
test:
11+
name: Test
12+
needs: [reusable]
13+
runs-on: ubuntu-latest
14+
steps:
15+
- env:
16+
REUSABLE_WORKFLOW_REF: ${{ needs.reusable.outputs.ref }}
17+
REUSABLE_WORKFLOW_SHA: ${{ needs.reusable.outputs.sha }}
18+
run: |
19+
if [[ "$REUSABLE_WORKFLOW_REF" != "" ]]; then
20+
echo "$REUSABLE_WORKFLOW_REF (REUSABLE_WORKFLOW_REF) != ''"
21+
exit 1
22+
fi
23+
24+
if [[ "$REUSABLE_WORKFLOW_SHA" != "d97024948175c71109e17aa55e62ff0bc9517fa0" ]]; then
25+
echo "$REUSABLE_WORKFLOW_SHA (REUSABLE_WORKFLOW_SHA) != d97024948175c71109e17aa55e62ff0bc9517fa0"
26+
exit 1
27+
fi

0 commit comments

Comments
 (0)