Merge pull request #616 from codex-team/fix/repetition-merge #413
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: Build and push docker image | |
on: [push] | |
env: | |
DOCKER_REPO: ${{ secrets.DOCKER_USERNAME }}/hawk-garage | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Make stage envfile | |
if: endsWith(github.ref, '/stage') | |
uses: SpicyPizza/create-envfile@v1 | |
with: | |
envkey_VUE_APP_HAWK_TOKEN: ${{ secrets.HAWK_TOKEN_STAGE }} | |
envkey_VUE_APP_AMPLITUDE_TOKEN: ${{ secrets.AMPLITUDE_TOKEN_STAGE }} | |
envkey_VUE_APP_CLOUDPAYMENTS_PUBLIC_ID: ${{ secrets.CP_PUBLIC_ID_STAGE }} | |
envkey_VUE_APP_API_ENDPOINT: "https://api.stage.hawk.so" | |
- name: Make prod envfile | |
if: endsWith(github.ref, '/prod') | |
uses: SpicyPizza/create-envfile@v1 | |
with: | |
envkey_VUE_APP_HAWK_TOKEN: ${{ secrets.HAWK_TOKEN_PROD }} | |
envkey_VUE_APP_AMPLITUDE_TOKEN: ${{ secrets.AMPLITUDE_TOKEN_PROD }} | |
envkey_VUE_APP_CLOUDPAYMENTS_PUBLIC_ID: ${{ secrets.CP_PUBLIC_ID_PROD }} | |
envkey_VUE_APP_API_ENDPOINT: "https://api.hawk.so" | |
- name: Build and push docker image | |
uses: docker/build-push-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
repository: ${{ env.DOCKER_REPO }} | |
tag_with_ref: true | |
push: ${{ endsWith(github.ref, '/stage') || endsWith(github.ref, '/prod') }} |