Skip to content

build(deps): bump next from 11.1.2 to 14.2.15 #87

build(deps): bump next from 11.1.2 to 14.2.15

build(deps): bump next from 11.1.2 to 14.2.15 #87

Workflow file for this run

name: Build Image
on:
workflow_dispatch:
create:
push:
paths:
- 'package.json'
jobs:
build_image:
name: Build Base Image
runs-on: ubuntu-22.04
steps:
- name: Set BRANCH
shell: bash
run: echo "BRANCH=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV
- name: Cluster specific envs
shell: bash
run: |
echo "CLUSTER=prod_1" >> $GITHUB_ENV
- name: Cluster specific envs
shell: bash
run: |
case $CLUSTER in
prod_1)
echo "DCR_HOST=245763787462.dkr.ecr.eu-central-1.amazonaws.com" >> $GITHUB_ENV
echo "DCR_PATH=meta-proof" >> $GITHUB_ENV
;;
esac
- name: Checkout Repo
uses: actions/checkout@v1
- name: Cluster specific AWS creds
shell: bash
run: |
echo "AWS_ACCESS_KEY_ID=${{ secrets[format('{0}_AWS_ACCESS_KEY_ID', env.CLUSTER)] }}" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=${{ secrets[format('{0}_AWS_SECRET_ACCESS_KEY', env.CLUSTER)] }}" >> $GITHUB_ENV
echo "AWS_REGION=${{ secrets[format('{0}_AWS_REGION', env.CLUSTER)] }}" >> $GITHUB_ENV
echo "AWS_PROFILE=${{ secrets[format('{0}_AWS_PROFILE', env.CLUSTER)] }}" >> $GITHUB_ENV
echo "AWS_ACCOUNTID=${{ secrets[format('{0}_AWS_ACCOUNTID', env.CLUSTER)] }}" >> $GITHUB_ENV
echo "GITHUB_MESSAGE=$(git log -1 --pretty=format:'%s')" >> $GITHUB_ENV
- name: Build Containers - Docker Compose
env:
DCR_HOST: ${{ env.DCR_HOST }}
DCR_PATH: ${{ env.DCR_PATH }}
BRANCH: ${{ env.BRANCH }}
AWS_PROFILE: ${{ env.AWS_PROFILE }}
AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ env.AWS_REGION }}
AWS_ACCOUNTID: ${{ env.AWS_ACCOUNTID }}
run: |
export DOCKER_BUILDKIT=0
docker-compose -f deployment/docker-compose-base.yml build
- name: Create AWS Profile
run: |
mkdir -p ~/.aws
cat << EoF >> ~/.aws/config
[${AWS_PROFILE}]
region = ${AWS_REGION}
EoF
cat << EoF >> ~/.aws/credentials
[${AWS_PROFILE}]
aws_access_key_id=${AWS_ACCESS_KEY_ID}
aws_secret_access_key=${AWS_SECRET_ACCESS_KEY}
EoF
- name: Push base containers to DCR
id: push
run: |
aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNTID.dkr.ecr.$AWS_REGION.amazonaws.com
docker-compose -f deployment/docker-compose-base.yml push
- name: Slack Notify
uses: rtCamp/action-slack-notify@v2
if: always()
env:
SLACK_CHANNEL: ci-alerts
SLACK_COLOR: ${{ steps.push.outcome }}
SLACK_ICON_EMOJI: ':m:'
SLACK_TITLE: 'Build Base Image'
SLACK_MESSAGE: 'package.json was changed, commit message: ${{ env.GITHUB_MESSAGE }}'
SLACK_USERNAME: 'CI/CD'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_CI_ALERTS }}
MSG_MINIMAL: 'commit,ref,actions url'
SLACK_FOOTER: 'Powered by GitHub Actions'
- name: Cleanup
if: always()
run: |
rm -f .env
rm -f .env_config
rm -f .env_secret
rm -f ~/.env_config
rm -f ~/.env_secret
rm -f ~/.aws/config
rm -f ~/.aws/credentials
rm -f ~/.kube/config
docker-compose -f deployment/docker-compose-base.yml down --remove-orphans