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

Update dockerimage.yml tags #350

Merged
merged 1 commit into from
Nov 30, 2023
Merged
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: 6 additions & 14 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ name: Docker Image CI
on:
pull_request:
branches:
- master
- main
- staging
- development
- refinement-demo-branch
push:
branches:
- master
- main
- staging
- development
- refinement-demo-branch

jobs:
build:
Expand Down Expand Up @@ -40,7 +38,7 @@ 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
Expand All @@ -51,12 +49,6 @@ jobs:
echo "APP_ENV=stag">> $GITHUB_ENV
echo "APP_BUILD=stag">> $GITHUB_ENV
echo "set APP_ENV to $APP_ENV"
- name: Setting APP_ENV to refi
if: contains( github.ref, 'refinement-demo-branch' ) || contains( github.base_ref, 'refinement-demo-branch' )
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 @@ -80,11 +72,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-branch')
- if: steps.containerregistry-login.outputs.success == 'true' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging' || 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 @@ -99,7 +91,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
Loading