Skip to content

Commit

Permalink
ci: prevent staging from recreating the image
Browse files Browse the repository at this point in the history
The develop workflow creates the image, so there's no need for the staging workflow to recreate it.

If the image hasn't been created by the develop workflow, then the deployment will fail. This should be the expected behaviour, rather than creating the image and not testing it fully.

Refs #395
  • Loading branch information
thewilkybarkid committed Aug 10, 2021
1 parent 9405fec commit bbceeec
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions .github/workflows/deploy_prereview-staging.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,18 @@
name: Build and deploy to staging
name: Deploy to staging

on:
push:
branches:
- main

env:
DOCKER_BUILDKIT: 1
IMAGE_TAG: ${{ github.sha }}
REGISTRY_USERNAME: prereview

jobs:

build:
runs-on: ubuntu-20.04

steps:
- name: 'Checkout code'
uses: actions/checkout@v2
with:
lfs: true

- name: 'Build image'
run: make build
env:
TARGET: 'prod'

- name: 'Smoke test'
run: .github/smoke-test.sh

- name: 'Log in to registry'
uses: azure/docker-login@v1
with:
login-server: prereview.azurecr.io
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: 'Push image'
run: docker push prereview.azurecr.io/prereview:${{ env.IMAGE_TAG }}

deploy:
runs-on: ubuntu-20.04
needs: build

steps:
- name: 'Checkout code'
Expand Down

0 comments on commit bbceeec

Please sign in to comment.