Publish v1 to prod (manually) #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish v1 to prod (manually) | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: {} | |
jobs: | |
publish_prod: | |
name: Push oengus.io | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: oengusio/frontend:v1-prod | |
cache-from: type=gha | |
cache-to: type=gha | |
build-args: | | |
PROFILE=production | |
- name: Trigger prod webhook | |
uses: distributhor/workflow-webhook@v3 | |
env: | |
webhook_url: ${{ secrets.PROD_WEBHOOK_URL }} | |
publish_to_sandbox: | |
name: Push sandbox.oengus.io | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push sandbox | |
id: docker_build_sandbox | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: oengusio/frontend:v1-sandbox | |
cache-from: type=gha | |
cache-to: type=gha | |
build-args: | | |
PROFILE=sandbox | |
- name: Trigger sandbox webhook | |
uses: distributhor/workflow-webhook@v3 | |
env: | |
webhook_url: ${{ secrets.SANDBOX_WEBHOOK_URL }} |