File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -17,27 +17,31 @@ jobs:
17
17
with :
18
18
fetch-depth : 0
19
19
token : ${{ secrets.GITHUB_TOKEN }}
20
- - name : Check for tags and conditionally exit
20
+ - name : Check for tags and set short-circuit condition
21
+ id : check-tags
21
22
run : |
22
23
# Fetch tags pointing to the current commit
23
24
TAGS=$(git tag --points-at $GITHUB_SHA)
24
25
echo "Tags found: $TAGS"
25
-
26
+
26
27
# Check if a tag exists and if the ref is 'refs/heads/main' or 'refs/heads/master'
27
28
if [ -n "$TAGS" ] && ([[ "${GITHUB_REF}" == "refs/heads/main" ]] || [[ "${GITHUB_REF}" == "refs/heads/master" ]]); then
28
- echo "Commit has a tag and is pushed to the main or master branch. Exiting."
29
- exit 0
29
+ echo "SHORT_CIRCUIT=true" >> $GITHUB_ENV
30
+ else
31
+ echo "SHORT_CIRCUIT=false" >> $GITHUB_ENV
30
32
fi
31
33
- uses : pnpm/action-setup@v4
34
+ if : env.SHORT_CIRCUIT == 'false'
32
35
with :
33
36
version : 9
34
37
- uses : actions/setup-node@v4
38
+ if : env.SHORT_CIRCUIT == 'false'
35
39
with :
36
40
node-version : 18
37
41
cache : pnpm
38
42
- name : Install Dependencies
43
+ if : env.SHORT_CIRCUIT == 'false'
39
44
run : pnpm install --no-lockfile
40
45
- name : Deploy Docs
41
- run : |
42
- cd test-app
43
- pnpm ember deploy production
46
+ if : env.SHORT_CIRCUIT == 'false'
47
+ run : pnpm ember deploy production
You can’t perform that action at this time.
0 commit comments