Skip to content

Commit

Permalink
Merge pull request #876 from hove-io/fix_push_simplification
Browse files Browse the repository at this point in the history
[tech] Github Actions runners - Simplification on release creation and push
  • Loading branch information
ArnaudOggy committed Dec 2, 2022
2 parents 491e9f0 + ce8325d commit 070389f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ env:
jobs:
rustfmt:
name: Rust fmt check
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
container: kisiodigital/rust-ci:latest
steps:
Expand All @@ -32,7 +31,6 @@ jobs:
"fields":[{"title":"Action URL","value": "https://github.com${{ github.action_path }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}]}]}'
clippy:
name: Clippy check
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
container: kisiodigital/rust-ci:latest-proj8.1.0
steps:
Expand All @@ -50,7 +48,6 @@ jobs:
"fields":[{"title":"Action URL","value": "https://github.com${{ github.action_path }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}]}]}'
audit:
name: Security audit
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
container: kisiodigital/rust-ci:latest-proj8.1.0
continue-on-error: true
Expand All @@ -70,7 +67,6 @@ jobs:
"fields":[{"title":"Action URL","value": "https://github.com${{ github.action_path }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}]}]}'
tests:
name: Tests
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
container: kisiodigital/rust-ci:latest-proj8.1.0
steps:
Expand All @@ -94,13 +90,7 @@ jobs:
dockerhub:
name: Dockerhub publication
needs: [rustfmt, clippy, audit, tests]
# If merge master => test jobs are mandatory performed and must be success
# If release => test jobs are skipped to speed up (because already done at merge master)
if: always() &&
(github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/master')) &&
(needs.rustfmt.result == 'skipped' || needs.rustfmt.result == 'success') &&
(needs.clippy.result == 'skipped' || needs.clippy.result == 'success') &&
(needs.tests.result == 'skipped' || needs.tests.result == 'success')
if: github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
steps:
- uses: AutoModality/action-clean@v1
Expand Down Expand Up @@ -130,8 +120,8 @@ jobs:
"fields":[{"title":"Action URL","value": "https://github.com${{ github.action_path }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}]}]}'
cratesio:
name: Crates.io publication
if: github.event_name == 'release'
needs: [dockerhub]
if: github.event_name == 'release'
runs-on: ubuntu-latest
container: kisiodigital/rust-ci:latest-proj8.1.0
steps:
Expand Down

0 comments on commit 070389f

Please sign in to comment.