Skip to content

Commit

Permalink
pipeline update
Browse files Browse the repository at this point in the history
  • Loading branch information
keijoraamat committed Aug 10, 2021
1 parent bb68e4c commit 1e8d269
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build_deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
run: |
SHORT_SHA=$(echo $GITHUB_SHA | cut -c 1-7) #pr-s test commit of merged state
echo "TAG=ghcr.io/internetee/accreditation_center:RC-$SHORT_SHA" >> $GITHUB_ENV
echo "STATIC_TAG=ghcr.io/internetee/accreditation_center:STATIC_RC-$SHORT_SHA" >> $GITHUB_ENV
echo "SHORT_TAG=RC-$SHORT_SHA" >> $GITHUB_ENV
- name: Set config files for build
Expand All @@ -43,12 +44,19 @@ jobs:
run: |
docker build -t $TAG --build-arg RAILS_ENV=staging --build-arg SECRET_KEY_BASE="$KEY_BASE" -f Dockerfile.generic .
- name: Build static content image
run: |
docker create -ti --name rails $TAG bash
docker cp rails:/opt/webapps/app/public/ ./public/
docker build -t $STATIC_TAG -f Dockerfile.generic-static .
- name: Push Docker images to gh container registry
env:
PASSWORD: ${{ secrets.GHCR }}
run: |
echo $PASSWORD | docker login ghcr.io -u eisbot --password-stdin
docker push $TAG
docker push $STATIC_TAG
- name: Get pull request reference number
run: |
Expand Down

0 comments on commit 1e8d269

Please sign in to comment.