-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from puppetlabs/maint-update_ci
(MAINT) CI Updates
- Loading branch information
Showing
7 changed files
with
101 additions
and
164 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
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,21 @@ | ||
name: community-labeller | ||
name: "community-labeller" | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
- "opened" | ||
pull_request_target: | ||
types: | ||
- opened | ||
- "opened" | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: puppetlabs/community-labeller@v0 | ||
name: Label issues or pull requests | ||
- uses: "puppetlabs/community-labeller@v0" | ||
name: "Label issues or pull requests" | ||
with: | ||
label_name: community | ||
label_color: '5319e7' | ||
org_membership: puppetlabs | ||
label_name: "community" | ||
label_color: "5319e7" | ||
org_membership: "puppetlabs" | ||
token: ${{ secrets.IAC_COMMUNITY_LABELER }} |
60 changes: 31 additions & 29 deletions
60
.github/workflows/publish.yml → .github/workflows/release.yml
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,80 +1,82 @@ | ||
name: "Publish" | ||
name: "release" | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-github-release: | ||
name: Deploy GitHub Release | ||
runs-on: ubuntu-20.04 | ||
github-release: | ||
name: "create release" | ||
runs-on: "ubuntu-latest" | ||
if: github.repository_owner == 'puppetlabs' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: "checkout" | ||
uses: "actions/checkout@v3" | ||
with: | ||
ref: ${{ github.ref }} | ||
clean: true | ||
fetch-depth: 0 | ||
|
||
- name: Get Version | ||
id: get_version | ||
- name: "get version" | ||
id: "get_version" | ||
run: | | ||
echo "::set-output name=version::$(jq --raw-output .version metadata.json)" | ||
- name: Create Release | ||
- name: "create release" | ||
run: | | ||
gh release create "${{ steps.get_version.outputs.version" | ||
gh release create "${{ steps.get_version.outputs.version }}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-gem: | ||
name: Deploy to rubygems | ||
runs-on: ubuntu-20.04 | ||
needs: create-github-release | ||
name: "publish gem" | ||
runs-on: "ubuntu-latest" | ||
needs: "github-release" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: "checkout" | ||
uses: "actions/checkout@v3" | ||
with: | ||
ref: ${{ github.ref }} | ||
clean: true | ||
fetch-depth: 0 | ||
|
||
- name: Activate Ruby | ||
- name: "setup ruby" | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
bundler-cache: true | ||
|
||
- name: Bundle Install | ||
run: | | ||
bundle install | ||
- name: Build Gem | ||
- name: "build" | ||
run: | | ||
bundle exec rake build | ||
- name: Publish Gem | ||
- name: "publish" | ||
run: | | ||
bundle exec rake push | ||
env: | ||
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }} | ||
|
||
publish-module: | ||
name: Deploy to Forge | ||
name: "publish module" | ||
runs-on: ubuntu-20.04 | ||
needs: publish-gem | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: "checkout" | ||
uses: "actions/checkout@v3" | ||
with: | ||
ref: ${{ github.ref }} | ||
clean: true | ||
|
||
- name: "PDK Build" | ||
uses: docker://puppet/pdk:latest | ||
- name: "update readme" | ||
run: | | ||
mv pwshlib.md README.md | ||
- name: "build" | ||
uses: "docker://puppet/pdk:latest" | ||
with: | ||
args: 'build' | ||
|
||
- name: "Push to Forge" | ||
uses: docker://puppet/pdk:latest | ||
- name: "publish" | ||
uses: "docker://puppet/pdk:latest" | ||
with: | ||
args: 'release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force' |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: "release prep" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: "The target for the release. This can be a commit sha or a branch." | ||
required: false | ||
default: "main" | ||
|
||
jobs: | ||
release_prep: | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release_prep.yml@main" | ||
with: | ||
target: "${{ github.event.inputs.target }}" | ||
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
Oops, something went wrong.