Skip to content

Commit

Permalink
Refine workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
pavetok committed Feb 23, 2024
1 parent f31263b commit 989582f
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 6 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/task_change.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Task change

on:
push:
branches:
- task/**
workflow_dispatch:

env:
IMAGE_NAME: stack/gear

jobs:
up-to-sources:
name: Up to sources (${{ matrix.env.dev }})
timeout-minutes: 5
permissions:
checks: write
packages: write
strategy:
fail-fast: false
matrix:
env:
- dev: turing
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Run setup-gear
uses: ./.github/actions/setup-gear
with:
devenv: ${{ matrix.env.dev }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run ansible-playbook sources.yaml
run: >-
docker run --rm
--volume $(pwd):$(pwd)
--volume ~/.m2:/root/.m2
--workdir $(pwd)/baker/ansible
${{ env.IMAGE_NAME }}:${{ matrix.env.dev }}
ansible-playbook sources.yaml
-e devenv=${{ matrix.env.dev }}
everything-is-fine:
name: Everything is fine
needs: [up-to-sources]
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ always() }}
steps:
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled') }}
run: |
echo "::error::Something went wrong"
exit 1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Sanity
name: Task proposal

on:
pull_request:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
name: Everything is fine
needs: [up-to-binaries]
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 5
if: ${{ always() }}
steps:
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled') }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
name: Convincing
name: Work change

on:
pull_request:
types: [synchronize]
branches:
- main
workflow_dispatch:
Expand Down Expand Up @@ -81,7 +82,7 @@ jobs:
name: Everything is fine
needs: [up-to-images]
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 5
if: ${{ always() }}
steps:
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled') }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
---
name: Beyond doubt
name: Work proposal

on:
merge_group:
branches:
- main
pull_request:
types: [opened, reopened]
branches:
- main
workflow_dispatch:

env:
Expand Down Expand Up @@ -237,7 +241,7 @@ jobs:
name: Everything is fine
needs: [stack-publishing, stack-reporting]
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 5
if: ${{ always() }}
steps:
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled') }}
Expand Down

0 comments on commit 989582f

Please sign in to comment.