File tree Expand file tree Collapse file tree 4 files changed +29
-10
lines changed
Expand file tree Collapse file tree 4 files changed +29
-10
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to Staging
2+
3+ on :
4+ push :
5+ tags :
6+ - staging-*
7+
8+
9+ jobs :
10+ deploy-to-staging :
11+ name : Simulate deployment to staging
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ with :
16+ ref : ${{ github.ref_name }} # Checks out the tag that triggered the workflow
17+
18+ - name : Tag repo
19+ # We do not have a real repo so we just tag the git repo and then the
20+ # simulate-environment-reporting-staging.yml will start reporting that
21+ # this environment is now running.
22+ run : |
23+ if git rev-parse running-staging >/dev/null 2>&1; then \
24+ git tag -d running-staging; \
25+ git push --delete origin running-staging; \
26+ fi
27+ git tag running-staging
28+ git push origin running-staging
Original file line number Diff line number Diff line change 2424 steps :
2525 - uses : actions/checkout@v4
2626 with :
27- ref : staging- running
27+ ref : running-staging
2828
2929 - name : Setup Kosli cli
3030 uses : kosli-dev/setup-cli-action@v2
Original file line number Diff line number Diff line change @@ -7,11 +7,3 @@ deploy_to_staging:
77 @git status --untracked-files=no | grep --silent " Your branch is up to date" || (echo " ERROR: your branch is NOT up to date with remote" && exit 1)
88 git tag staging-${TIMESTAMP}
99 git push origin staging-${TIMESTAMP} $(args )
10-
11- # The rest is a little extra for simulating the staging environment.
12- @if git rev-parse staging-running >/dev/null 2>&1; then \
13- git tag -d staging-running; \
14- git push --delete origin staging-running; \
15- fi
16- git tag staging-running
17- git push origin staging-running
Original file line number Diff line number Diff line change @@ -2,4 +2,3 @@ This is just a file to test out that changes to front-end source code
22can trigger a build, reporting to Kosli and Jira
33
44counter=4
5-
You can’t perform that action at this time.
0 commit comments