Skip to content

Commit b733990

Browse files
committed
update github action workflows
1 parent acfa0bd commit b733990

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: CI
22

33
on:
4+
workflow_call:
45
pull_request:
56
push:
67

.github/workflows/hex.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
11
name: CI
22

33
on:
4-
pull_request:
5-
branches:
6-
- main
4+
workflow_call:
75
push:
86
branches:
97
- main
108

119
jobs:
12-
check_commit_message:
13-
name: skips CI and prints cli message, without fail build badge
10+
ci_workflow:
11+
uses: ./.github/workflows/ci.yml
12+
staging_deploy:
1413
runs-on: ubuntu-latest
15-
if: "contains(github.event.head_commit.message, '[skip ci]')"
16-
steps:
17-
- run: echo "no need to build, based from commit message"
18-
1914
publish_to_hex:
2015
name: "Publish to Hex"
2116
runs-on: ubuntu-latest
22-
23-
# doesn't contain "ci skip" in commit message
24-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
17+
needs: [ci_workflow]
2518
steps:
26-
run: |
27-
mix hex.config api_key ${{ secrets.HEX_API_KEY }}
28-
mix hex.publish --yes
19+
- run: |
20+
mix hex.config api_key ${{ secrets.HEX_API_KEY }}
21+
mix hex.publish --yes

0 commit comments

Comments
 (0)