mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 18:21:03 -03:30
[Devel] Addition of logic to trigger worflow dispatch on release_4.6 and stable-2.6 (#16315)
* Added worflow dispatch to trigger ci on release_4.6 and stable-2.6 * fix error cascading to subsequent jobs for cron * made compose_tag resolve to the correct branch name
This commit is contained in:
34
.github/workflows/ci.yml
vendored
34
.github/workflows/ci.yml
vendored
@@ -4,7 +4,7 @@ env:
|
|||||||
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
|
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
|
||||||
CI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
CI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
DEV_DOCKER_OWNER: ${{ github.repository_owner }}
|
DEV_DOCKER_OWNER: ${{ github.repository_owner }}
|
||||||
COMPOSE_TAG: ${{ github.base_ref || 'devel' }}
|
COMPOSE_TAG: ${{ github.base_ref || github.ref_name || 'devel' }}
|
||||||
UPSTREAM_REPOSITORY_ID: 91594105
|
UPSTREAM_REPOSITORY_ID: 91594105
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -12,8 +12,38 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- devel # needed to publish code coverage post-merge
|
- devel # needed to publish code coverage post-merge
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 13,18 * * *'
|
- cron: '0 12,18 * * 1-5'
|
||||||
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
|
trigger-release-branches:
|
||||||
|
name: "Dispatch CI to release branches"
|
||||||
|
if: github.event_name == 'schedule'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
steps:
|
||||||
|
- name: Trigger CI on release_4.6
|
||||||
|
id: dispatch_release_46
|
||||||
|
continue-on-error: true
|
||||||
|
run: gh workflow run ci.yml --ref release_4.6
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
- name: Trigger CI on stable-2.6
|
||||||
|
id: dispatch_stable_26
|
||||||
|
continue-on-error: true
|
||||||
|
run: gh workflow run ci.yml --ref stable-2.6
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
- name: Check dispatch results
|
||||||
|
if: steps.dispatch_release_46.outcome == 'failure' || steps.dispatch_stable_26.outcome == 'failure'
|
||||||
|
run: |
|
||||||
|
echo "One or more dispatches failed:"
|
||||||
|
echo " release_4.6: ${{ steps.dispatch_release_46.outcome }}"
|
||||||
|
echo " stable-2.6: ${{ steps.dispatch_stable_26.outcome }}"
|
||||||
|
exit 1
|
||||||
|
|
||||||
common-tests:
|
common-tests:
|
||||||
name: ${{ matrix.tests.name }}
|
name: ${{ matrix.tests.name }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user