From 7719b6cb55f9fc90d46e2cfdc1c935efbb72c730 Mon Sep 17 00:00:00 2001 From: Kevin Meinhardt Date: Fri, 15 Mar 2024 11:28:52 +0100 Subject: [PATCH] Update push workflow and use main branch as default (#20) * use main branch for default * Remove stage to stage copy --- .github/actions/build/action.yml | 4 ++-- .github/workflows/push.yml | 4 ++-- Dockerfile | 22 +++++++++------------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 91afbcb..3a79166 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -17,8 +17,8 @@ runs: - name: Validate inputs shell: bash run: | - if [[ "${{ inputs.push }}" == "true" && "${{ github.ref }}" == "refs/heads/master" ]]; then - echo "Cannot push to registry from master branch unless we migrate our master build job to GHA." + if [[ "${{ inputs.push }}" == "true" && "${{ github.ref }}" == "refs/heads/main" ]]; then + echo "Cannot push to registry from main branch unless we migrate our main build job to GHA." exit 1 fi # Setup docker to build for multiple architectures diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e3676fe..0b8aed0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -4,7 +4,7 @@ on: merge_group: push: branches: - - master + - main jobs: deploy_staging: @@ -18,7 +18,7 @@ jobs: echo "Deploying to staging" # Your deployment script here deploy_production: - if: ${{ github.event_name == 'push' }} && ${{ github.ref == 'refs/heads/master' }} + if: ${{ github.event_name == 'push' }} && ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest needs: deploy_staging steps: diff --git a/Dockerfile b/Dockerfile index 697e005..44b147e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,20 @@ FROM node:18 as base - WORKDIR /app -COPY package*.json /app/ - -RUN /bin/bash <