Skip to content

Commit

Permalink
Merge pull request #398 from h0tw1r3/cat-workflows
Browse files Browse the repository at this point in the history
replace gha workflows
  • Loading branch information
h0tw1r3 authored Apr 12, 2024
2 parents 2525e61 + d3c592b commit 5656cdb
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 329 deletions.
57 changes: 8 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,20 @@
---
name: "ci"

on:
pull_request:
types:
- opened
- labeled
- synchronize
branches:
- "main"
paths-ignore:
- '**.md'
- 'examples/**'
- 'LICENSE'
- 'CODEOWNERS'
- 'AUTHORS'
workflow_dispatch:
inputs:
debug:
description: "Debug"
type: boolean
required: false
default: true
run_spec:
description: "Run Spec job"
type: boolean
required: false
default: true
run_acceptance:
description: "Run Acceptance job"
type: boolean
required: false
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Matrix:
uses: ./.github/workflows/matrix.yml
with:
flags: "--exclude-platforms '[\"Ubuntu-18.04\"]'" # TODO: remove after postgres module update
Spec:
if: ${{ github.event_name == 'pull_request' || inputs.run_spec == 'true' }}
needs: Matrix
uses: ./.github/workflows/module_spec.yml
secrets: inherit
with:
debug: ${{ github.events.inputs.debug == 'true' || contains(github.event.pull_request.labels.*.name, 'debug') }}
ignore_dependency_check: true # TODO: remove after module updates
matrix: ${{ needs.Matrix.outputs.spec_matrix }}
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
secrets: "inherit"

Acceptance:
if: ${{ github.event_name == 'pull_request' || inputs.run_acceptance == 'true' }}
needs: [ Matrix, Spec ]
uses: ./.github/workflows/module_acceptance.yml
secrets: inherit
needs: Spec
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
secrets: "inherit"
with:
debug: ${{ github.events.inputs.debug == 'true' || contains(github.event.pull_request.labels.*.name, 'debug') }}
matrix: ${{ needs.Matrix.outputs.acceptance_matrix }}
runs_on: ubuntu-20.04 # TODO: cgroupv1 containers do not provision on ubuntu-latest
runs_on: "ubuntu-20.04"
28 changes: 28 additions & 0 deletions .github/workflows/labeller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Labeller

on:
issues:
types:
- opened
- labeled
- unlabeled
pull_request_target:
types:
- opened
- labeled
- unlabeled

jobs:
label:
runs-on: ubuntu-latest
steps:

- uses: puppetlabs/[email protected]
name: Label issues or pull requests
with:
label_name: community
label_color: '5319e7'
org_membership: puppetlabs
fail_if_member: 'true'
token: ${{ secrets.IAC_COMMUNITY_LABELER }}
49 changes: 0 additions & 49 deletions .github/workflows/matrix.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/mend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: "mend"

on:
pull_request_target:
types:
- opened
- synchronize
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
mend:
uses: "puppetlabs/cat-github-actions/.github/workflows/mend_ruby.yml@main"
secrets: "inherit"
125 changes: 0 additions & 125 deletions .github/workflows/module_acceptance.yml

This file was deleted.

88 changes: 0 additions & 88 deletions .github/workflows/module_spec.yml

This file was deleted.

Loading

0 comments on commit 5656cdb

Please sign in to comment.