-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
- Loading branch information
Showing
3 changed files
with
107 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- development-4.0 # Remove this when the branch switch happens. | ||
pull_request: | ||
branches: | ||
- master | ||
- development-4.0 # Remove this when the branch switch happens. | ||
|
||
jobs: | ||
documentation: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup | ||
uses: peaceiris/actions-mdbook@v1 | ||
with: | ||
mdbook-version: 'latest' | ||
- run: mdbook build | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
container: docker.io/library/golang:1.14-alpine | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: OS Dependencies | ||
run: apk add --no-cache tar rpm build-base | ||
- name: Go Dependencies | ||
run: go mod vendor | ||
- name: Tests | ||
run: go test ./... |
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,65 @@ | ||
--- | ||
name: Prepare Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v4.*' | ||
|
||
jobs: | ||
create: | ||
name: Create Release | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: Setup | ||
run: | | ||
: "${tag:=${GITHUB_REF#refs/tags/}}" | ||
cat <<. | ||
::set-env name=CLAIR_VERSION::${tag} | ||
. | ||
- name: Create Release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ env.CLAIR_VERSION}} Release | ||
body: | | ||
Coming Soon... | ||
draft: true | ||
prerelease: ${{ contains(env.CLAIR_VERSION, 'alpha') || contains(env.CLAIR_VERSION, 'beta') || contains(env.CLAIR_VERSION, 'rc') }} | ||
stable: | ||
if: endsWith(github.ref, '.0') | ||
name: Create Stable Helpers | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: Create Branch | ||
uses: actions/github-script@0.9.0 | ||
with: | ||
script: | | ||
const tag = context.ref.replace("refs/tags/", ""); | ||
github.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: 'refs/heads/release-' + tag, | ||
sha: context.sha | ||
}); | ||
- name: Create Labels | ||
uses: actions/github-script@0.9.0 | ||
with: | ||
script: | | ||
const tag = context.ref.replace("refs/tags/", "").slice(0, -2); | ||
github.issues.createLabel({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: 'NeedsBackport-' + tag, | ||
color: '790604', | ||
description: `This needs to be backported to ${tag}` | ||
}); | ||
github.issues.createLabel({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: 'PossibleBackport-' + tag, | ||
color: '008000', | ||
description: `This may need to be backported to ${tag}` | ||
}); |