Skip to content

Commit

Permalink
Merge pull request #292 from dev-sec/fix-ci
Browse files Browse the repository at this point in the history
CI: fix - we need three guard jobs
  • Loading branch information
artem-sidorenko authored Jun 6, 2023
2 parents 1ae0279 + d0e6a0f commit f46ea25
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ jobs:
run: |
kitchen test --color --destroy=always ${{ matrix.kitchen_distro }}
pass-all-tests:
if: github.repository != 'dev-sec/chef-os-hardening'
pass-all-jobs:
if: "!(github.repository == 'dev-sec/chef-os-hardening' && startsWith(github.head_ref, 'release/v')) && always()"
needs:
- cookstyle
- kitchen-dokken
Expand All @@ -115,8 +115,8 @@ jobs:
with:
jobs: ${{ toJSON(needs) }}

pass-all-tests-with-digitalocean:
if: github.repository == 'dev-sec/chef-os-hardening'
pass-all-jobs-with-digitalocean:
if: "(github.repository == 'dev-sec/chef-os-hardening' && !(startsWith(github.head_ref, 'release/v'))) && always()"
needs:
- cookstyle
- kitchen-dokken
Expand All @@ -127,3 +127,12 @@ jobs:
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

pass-all-jobs-release:
if: "github.repository == 'dev-sec/chef-os-hardening' && startsWith(github.head_ref, 'release/v') && always()"
runs-on: ubuntu-latest
steps:
- name: happy releasing
run: |
echo "Happy releasing :-)"
# this is just a succeessfull placeholder to make release PR pass

0 comments on commit f46ea25

Please sign in to comment.