Skip to content

Commit

Permalink
Added workflows publishing the 'master' container image (#718)
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
jpkrohling authored Oct 21, 2019
1 parent f1ff089 commit 33f5317
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .ci/publish-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ OPERATOR_VERSION=${OPERATOR_VERSION:-$(git describe --tags)}

## if we are on a release tag, let's extract the version number
## the other possible value, currently, is 'master' (or another branch name)
## if we are not running in travis, it fallsback to the `git describe` above
## if we are not running in the CI, it fallsback to the `git describe` above
if [[ $OPERATOR_VERSION == release* ]]; then
OPERATOR_VERSION=$(echo ${OPERATOR_VERSION} | grep -Po "([\d\.]+)")
MAJOR_MINOR=$(echo ${OPERATOR_VERSION} | awk -F. '{print $1"."$2}')
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/publish-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on:
push:
branches:
- master

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: "publishes the images"
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
OPERATOR_VERSION: master
run: ./.ci/publish-images.sh
9 changes: 8 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,12 @@ jobs:
- uses: actions/checkout@v1
- name: "perform the release"
env:
GH_WRITE_TOKEN: ${{ secrets. GH_WRITE_TOKEN }}
GH_WRITE_TOKEN: ${{ secrets.GH_WRITE_TOKEN }}
run: ./.ci/release.sh
- name: "publishes the images"
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
run: ./.ci/publish-images.sh

0 comments on commit 33f5317

Please sign in to comment.