Skip to content

Commit b661f06

Browse files
authored
Development (#29)
* update for current branch, not just development * test * update commit hash * try full name of tests, not id * test * update commit hash * trying another worwflow depenecy approach * test * update commit hash * apparently both parts are needed * update commit hash * test * empty workflow_call: may be needed * test * update commit hash * force run of dependency * update commit hash * that worked; updating other dependency * update commit hash * test * test * that dependency requires duplicate effort and is not needed * update commit hash * test
1 parent 77519fc commit b661f06

File tree

5 files changed

+11
-20
lines changed

5 files changed

+11
-20
lines changed

.github/workflows/Remove-Function-Name-Prefix.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
name: Remove Function Name Prefixes
22

33
on:
4+
workflow_call:
45
push:
5-
branches:
6-
- development
76

87
jobs:
98
remove-function-prefix:
10-
name: remove prefixes
119
runs-on: ubuntu-latest
1210
steps:
1311
- uses: actions/checkout@v3
1412
- run: |
15-
git pull origin development --rebase
13+
git pull origin ${{ github.ref_name }} --rebase
1614
for file in $(find ./snippets/functions/ -type f -name '*.js'); do
1715
if [[ "$file" == *"_"* ]];then
1816
justfile=$(basename -- "$file")
@@ -29,4 +27,4 @@ jobs:
2927
git config --global user.name "ActionBot"
3028
git commit -m 'test'
3129
git push -f
32-
git reset origin/development --soft
30+
git reset origin/${{ github.ref_name }} --soft

.github/workflows/Run-Tests.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
name: Atlas Functions and Triggers Example Tests
1+
name: Test Examples
22

33
on:
4-
workflow_run:
5-
workflows: [remove-function-prefix]
6-
types: [completed]
4+
workflow_call:
75
push:
8-
paths:
9-
- "snippets/**"
106

117
jobs:
128
run-node-tests:
13-
name: Run Function and Trigger Tests
149
runs-on: ubuntu-latest
15-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1610
strategy:
1711
matrix:
1812
node-version: [18.x]

.github/workflows/Update-Commit-Hash.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
- uses: actions/checkout@v2
1313
- name: Update file with merge commit hash
1414
run: |
15-
git pull origin development --rebase
15+
git pull origin ${{ github.ref_name }} --rebase
1616
git log -1 --format='%H' > latestCommit.md
1717
git config --global user.email "[email protected]"
1818
git config --global user.name "ActionBot"
1919
git add latestCommit.md
2020
git commit -m 'update commit hash'
2121
git push -f
22-
git reset origin/development --soft
22+
git reset origin/${{ github.ref_name }} --soft

.github/workflows/zip-and-upload-to-s3-development.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
name: Zip and Upload to S3 for Development
22

33
on:
4-
workflow_run:
5-
workflows: [run-node-tests]
6-
types: [completed]
74
push:
85
branches:
96
- development
107

118
jobs:
9+
deploy-after-testing:
10+
uses: ./.github/workflows/Run-Tests.yml
1211
zip-and-upload:
13-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1412
runs-on: ubuntu-latest
13+
needs: [deploy-after-testing]
1514
steps:
1615
- uses: actions/checkout@v2
1716
- run: mkdir zip

latestCommit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f3506f802f261b9c77039993b6814a97188cbd69
1+
f1aa920629fa132800499ef8a63ef3483c758968

0 commit comments

Comments
 (0)