Skip to content

Commit

Permalink
More correction of branches
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzondervan committed Nov 14, 2023
1 parent f81c829 commit 33b5c2b
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,11 @@ jobs:
echo "APP_BUILD=dev">> $GITHUB_ENV
echo "set APP_ENV to $APP_ENV"
- name: Setting APP_ENV to prod
if: contains( github.ref, 'master' ) || contains( github.base_ref, 'master' )
if: contains( github.ref, 'main' ) || contains( github.base_ref, 'main' )
run: |
echo "APP_ENV=latest">> $GITHUB_ENV
echo "APP_BUILD=latest">> $GITHUB_ENV
echo "set APP_ENV to $APP_ENV"
- name: Setting APP_ENV to stag
if: contains( github.ref, 'staging' ) || contains( github.base_ref, 'staging' )
run: |
echo "APP_ENV=stag">> $GITHUB_ENV
echo "APP_BUILD=stag">> $GITHUB_ENV
echo "set APP_ENV to $APP_ENV"
- name: Print definitive APP_ENV
run: echo "APP_ENV is now $APP_ENV and APP_BUILD is now $APP_BUILD"
- name: Build the Docker image
Expand All @@ -70,11 +64,11 @@ jobs:
else
echo "##[set-output name=success;]false"
fi
- if: steps.containerregistry-login.outputs.success == 'true' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/development' || github.ref == 'refs/heads/refinement-demo')
- if: steps.containerregistry-login.outputs.success == 'true' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development')
name: Push to Container Registry
run: docker-compose push

- if: steps.containerregistry-login.outputs.success == 'true' && github.ref == 'refs/heads/master'
- if: steps.containerregistry-login.outputs.success == 'true' && github.ref == 'refs/heads/main'
name: Push versioned containers to Container Registry
id: version-push
run: |
Expand All @@ -89,7 +83,7 @@ jobs:
env:
RELEASENAME: ${{ steps.releasecode.outputs.releasename }}
- name: Create Release
if: contains( github.ref, 'master' ) && steps.version-push.outputs.success == 'true' && ( success() || failure() )
if: contains( github.ref, 'main' ) && steps.version-push.outputs.success == 'true' && ( success() || failure() )
id: create_release
uses: actions/create-release@v1
continue-on-error: true
Expand Down

0 comments on commit 33b5c2b

Please sign in to comment.