Skip to content

Commit

Permalink
Fix and minor improvements to all-in-one github action
Browse files Browse the repository at this point in the history
Signed-off-by: Ashmita Bohara <ashmita.bohara152@gmail.com>
  • Loading branch information
Ashmita152 committed Nov 30, 2020
1 parent ae162b8 commit 582f3ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/all-in-one-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ jobs:

- name: Export BRANCH variable for pull_request event
run: |
echo "BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
export BRANCH=${GITHUB_HEAD_REF}
echo "we are on branch=$BRANCH"
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
if: github.event_name == 'pull_request'

- name: Export BRANCH variable for push event
Expand Down
2 changes: 1 addition & 1 deletion scripts/travis/build-all-in-one-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ run_integration_test() {

upload_to_docker() {
# Only push the docker container to Docker Hub for master branch
if [[ ("$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$) && "DOCKERHUB_LOGIN" == "true" ]]; then
if [[ ("$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$) && "$DOCKERHUB_LOGIN" == "true" ]]; then
echo "upload $1 to Docker Hub"
export REPO=$1
bash ./scripts/travis/upload-to-docker.sh
Expand Down

0 comments on commit 582f3ae

Please sign in to comment.