Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docker and quay logins; add GH... #1015

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
workflow_dispatch:
inputs:
version:
description: 'version'
description: 'The version that is going to be released. Should be in format 7.y.z'
required: true
default: '7.y.z'
jobs:
build:
Expand All @@ -16,10 +17,25 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Login to quay.io
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
registry: docker.io
- name: Login to docker.io
uses: docker/login-action@v1
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- uses: actions/setup-node@v2.1.2
with:
node-version: 12.18.2
- run: yarn install
- name: Run make-release.sh script
run: |
./make-release.sh ${{ github.event.inputs.version }}
git config --global user.name "Mykhailo Kuznietsov"
git config --global user.email "mkuznets@redhat.com"
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
/bin/bash -x make-release.sh ${{ github.event.inputs.version }}
29 changes: 18 additions & 11 deletions make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,27 @@
set -e
set -u

usage ()
{ echo "Usage: ./make-release.sh <version>"
exit
}

if [[ $# -lt 1 ]]; then usage; fi

while [[ "$#" -gt 0 ]]; do
case $1 in
'--release') RELEASE="$1"; shift 1;;
*) RELEASE="$1"; shift 0;;
'--help'|'-h') usage;;
esac
shift 1
done

init() {
RELEASE="$1"
BRANCH=$(echo $RELEASE | sed 's/.$/x/')
GIT_REMOTE_UPSTREAM="git@github.com:che-incubator/chectl.git"
}

check() {
if [[ $# -lt 1 ]]; then
echo "[ERROR] Wrong number of parameters.\nUsage: ./make-release.sh <version>"
exit 1
fi
}

apply_sed() {
SHORT_UNAME=$(uname -s)
if [ "$(uname)" == "Darwin" ]; then
Expand Down Expand Up @@ -108,6 +116,5 @@ run() {
createPR
}

init $@
check $@
run $@
init
run