forked from stolostron/compute-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* tag quay when release/tag created Signed-off-by: Chris Ahl <[email protected]> * test on non-main branch Signed-off-by: Chris Ahl <[email protected]> * test on fork Signed-off-by: Chris Ahl <[email protected]> * change back to main branch after testing in fork Signed-off-by: Chris Ahl <[email protected]>
- Loading branch information
Showing
3 changed files
with
71 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright Red Hat | ||
|
||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
publish: | ||
if: github.repository_owner == 'stolostron' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Install Dependencies and Publish | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
DOCKER_PASS: ${{ secrets.DOCKER_PASS }} | ||
run: | | ||
export VERSION="0.0.1-$(date -u +'%Y%m%d-%H-%M-%S')-${GITHUB_SHA::7}-${GITHUB_REF_NAME}" | ||
make publish PUSH_LATEST=true |
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,33 @@ | ||
# Copyright Red Hat | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
# Has to use not-quite-regex from https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+*' | ||
|
||
name: Create Release | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Install kubebuilder | ||
run: make envtest-tools | ||
|
||
- name: Publish a release tagged image | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
DOCKER_PASS: ${{ secrets.DOCKER_PASS }} | ||
run: | | ||
export VERSION=${GITHUB_REF##*/} | ||
export IMG=quay.io/stolostron/cluster-registration-operator:${GITHUB_REF##*/} | ||
make publish |
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