diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 2a919753..3931a768 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -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 @@ -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: | @@ -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