Skip to content

Commit

Permalink
update workflows (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-m-sullivan committed Dec 6, 2022
1 parent e3c0a8e commit 7d7b744
Show file tree
Hide file tree
Showing 15 changed files with 112 additions and 355 deletions.
33 changes: 0 additions & 33 deletions .github/workflow-config/create_changelog.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflow-config/release.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflow-config/release_tarball.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/automerge-release.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/cop-galaxy-release.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/create_changelog.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/infra-galaxy-release.yml

This file was deleted.

36 changes: 26 additions & 10 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
---
# This workflow action will run pre-commit, which will execute ansible and yaml linting
# See .pre-commit-config.yml for what hooks are executed
name: Yaml and Ansible Lint
# See .pre-commit-config.yaml for what hooks are executed
name: pre-commit tests

on: [push, pull_request] # yamllint disable-line rule:truthy

on:
pull_request:
push:
schedule:
- cron: "0 6 * * *"

jobs:
pre-commit:
uses: "redhat-cop/ansible_collections_tooling/.github/workflows/pre-commit.yml@main"
sanity:
uses: "redhat-cop/ansible_collections_tooling/.github/workflows/sanity.yml@main"
with:
collection_namespace: infra
collection_name: ee_utilities
collection_version: 1.0.0
collection_repo: https://github.com/redhat-cop/ee_utilities/
all_green:
if: ${{ always() }}
needs:
- pre-commit
- sanity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install Collections
run: |
sudo apt install software-properties-common
pip install --upgrade ansible
- uses: pre-commit/action@v2.0.0
- run: >-
python -c "assert set([
'${{ needs.pre-commit.result }}',
'${{ needs.sanity.result }}',
]) == {'success'}"
...
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
# This workflow action will run pre-commit, which will execute ansible and yaml linting
# See .pre-commit-config.yaml for what hooks are executed
name: Release

on:
release:
types:
- published

jobs:
pre-commit:
uses: redhat-cop/ansible_collections_tooling/.github/workflows/pre-commit.yml@main
sanity:
uses: redhat-cop/ansible_collections_tooling/.github/workflows/sanity.yml@main
with:
collection_namespace: infra
collection_name: ee_utilities
collection_version: 1.0.0
collection_repo: https://github.com/redhat-cop/ee_utilities/
prechecks:
needs:
- pre-commit
- sanity
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert set([
'${{ needs.pre-commit.result }}',
'${{ needs.sanity.result }}',
]) == {'success'}"
cop_release:
needs:
- prechecks
uses: redhat-cop/ansible_collections_tooling/.github/workflows/release.yml@main
with:
collection_namespace: redhat_cop
collection_name: ee_utilities
collection_version: ${{ github.ref_name }}
collection_repo: https://github.com/redhat-cop/ee_utilities/
secrets:
api_key: ${{ secrets.ANSIBLE_GALAXY_APIKEY }}
token: ${{ secrets.GITHUB_TOKEN }}
infra_release:
needs:
- cop_release
uses: redhat-cop/ansible_collections_tooling/.github/workflows/release.yml@main
with:
collection_namespace: infra
collection_name: ee_utilities
collection_version: ${{ github.ref_name }}
collection_repo: https://github.com/redhat-cop/ee_utilities/
secrets:
api_key: ${{ secrets.GALAXY_INFRA_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
release_check:
needs:
- cop_release
- infra_release
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert set([
'${{ needs.infra_release.result }}',
'${{ needs.cop_release.result }}',
]) == {'success'}"
changelog:
needs:
- release_check
uses: redhat-cop/ansible_collections_tooling/.github/workflows/create_changelog.yml@main
with:
collection_namespace: infra
collection_name: ee_utilities
collection_version: ${{ github.ref_name }}
collection_repo: https://github.com/redhat-cop/ee_utilities/
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
...
Loading

0 comments on commit 7d7b744

Please sign in to comment.