-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(MAINT) Apply yaml formatting to GitHub Actions workflows (#490)
- Added yamlfix action to format YAML files in GitHub Actions workflows. - Updated various YAML files to ensure consistent formatting.
- Loading branch information
Showing
23 changed files
with
534 additions
and
792 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
directory: / | ||
schedule: | ||
interval: daily | ||
time: "13:00" | ||
time: 13:00 | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,62 @@ | ||
name: "Auto release" | ||
|
||
--- | ||
name: Auto release | ||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
auto_release: | ||
name: "Automatic release prep" | ||
name: Automatic release prep | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: "Checkout Source" | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: "PDK Release prep" | ||
uses: docker://puppet/puppet-dev-tools:4.x | ||
with: | ||
args: 'pdk release prep --force --debug' | ||
env: | ||
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: "Get Version" | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
id: gv | ||
run: | | ||
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)" | ||
- name: "Check if a release is necessary" | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
id: check | ||
run: | | ||
git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true" | ||
- name: "Commit changes" | ||
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }} | ||
run: | | ||
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git commit -m "Release prep v${{ steps.gv.outputs.ver }}" | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: puppetlabs/peter-evans-create-pull-request@v3 | ||
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }} | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: "Release prep v${{ steps.gv.outputs.ver }}" | ||
branch: "release-prep" | ||
delete-branch: true | ||
title: "Release prep v${{ steps.gv.outputs.ver }}" | ||
body: | | ||
Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb) from commit ${{ github.sha }}. | ||
Please verify before merging: | ||
- [ ] last [nightly](https://github.com/${{ github.repository }}/actions/workflows/nightly.yml) run is green | ||
- [ ] [Changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) is readable and has no unlabeled pull requests | ||
- [ ] Ensure the [changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) version and [metadata](https://github.com/${{ github.repository }}/blob/release-prep/metadata.json) version match | ||
labels: "maintenance" | ||
|
||
- name: PR outputs | ||
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }} | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | ||
- name: Checkout Source | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- name: PDK Release prep | ||
uses: docker://puppet/puppet-dev-tools:4.x | ||
with: | ||
args: pdk release prep --force --debug | ||
env: | ||
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get Version | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
id: gv | ||
run: | | ||
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)" | ||
- name: Check if a release is necessary | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
id: check | ||
run: | | ||
git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true" | ||
- name: Commit changes | ||
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }} | ||
run: | | ||
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git commit -m "Release prep v${{ steps.gv.outputs.ver }}" | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: puppetlabs/peter-evans-create-pull-request@v3 | ||
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }} | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Release prep v${{ steps.gv.outputs.ver }} | ||
branch: release-prep | ||
delete-branch: true | ||
title: Release prep v${{ steps.gv.outputs.ver }} | ||
body: | | ||
Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb) from commit ${{ github.sha }}. | ||
Please verify before merging: | ||
- [ ] last [nightly](https://github.com/${{ github.repository }}/actions/workflows/nightly.yml) run is green | ||
- [ ] [Changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) is readable and has no unlabeled pull requests | ||
- [ ] Ensure the [changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) version and [metadata](https://github.com/${{ github.repository }}/blob/release-prep/metadata.json) version match | ||
labels: maintenance | ||
- name: PR outputs | ||
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }} | ||
run: |- | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
name: "ci" | ||
|
||
--- | ||
name: ci | ||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Spec: | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" | ||
secrets: "inherit" | ||
|
||
uses: puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main | ||
secrets: inherit | ||
Acceptance: | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
needs: Spec | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" | ||
uses: puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main | ||
with: | ||
flags: "--provision-service" | ||
secrets: "inherit" | ||
flags: --provision-service | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
name: "mend" | ||
|
||
--- | ||
name: mend | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- "main" | ||
types: [closed] | ||
branches: [main] | ||
schedule: | ||
- cron: "0 0 * * *" | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
|
||
jobs: | ||
mend: | ||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.ref == 'refs/heads/main') | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/tooling_mend_ruby.yml@main" | ||
secrets: "inherit" | ||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | ||
|| (github.event.pull_request.merged == true && github.ref == 'refs/heads/main') | ||
uses: puppetlabs/cat-github-actions/.github/workflows/tooling_mend_ruby.yml@main | ||
secrets: inherit | ||
with: | ||
product_name: InsTalleR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
name: "nightly" | ||
|
||
--- | ||
name: nightly | ||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Spec: | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" | ||
secrets: "inherit" | ||
|
||
uses: puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main | ||
secrets: inherit | ||
Acceptance: | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
needs: Spec | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" | ||
uses: puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main | ||
with: | ||
flags: "--provision-service" | ||
secrets: "inherit" | ||
flags: --provision-service | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
name: "Release Prep" | ||
|
||
--- | ||
name: Release Prep | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Module version to be released. Must be a valid semver string. (1.2.3)" | ||
description: Module version to be released. Must be a valid semver string. | ||
(1.2.3) | ||
required: true | ||
|
||
jobs: | ||
release_prep: | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main" | ||
uses: puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main | ||
with: | ||
version: "${{ github.event.inputs.version }}" | ||
secrets: "inherit" | ||
version: ${{ github.event.inputs.version }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
name: "Publish module" | ||
|
||
--- | ||
name: Publish module | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@main" | ||
secrets: "inherit" | ||
release: | ||
uses: puppetlabs/cat-github-actions/.github/workflows/module_release.yml@main | ||
secrets: inherit |
Oops, something went wrong.