Revert "Production debugging let's go" #17
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 & Push Frontend | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
- 'frontend' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install yq | |
run: | | |
wget -qO ./yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 | |
chmod u+x ./yq | |
- name: Get frontend version | |
run: echo "IMAGE_TAG=$(./yq '.images[2].newTag' k8s/overlays/dev/kustomization.yaml)" >> $GITHUB_ENV | |
- name: Build Docker image | |
working-directory: ./frontend | |
run: docker build -t musiek/frontend:${{ env.IMAGE_TAG }} -t musiek/frontend:latest . | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_LOGIN }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push Docker image | |
run: | | |
docker push musiek/frontend:${{ env.IMAGE_TAG }} | |
docker push musiek/frontend:latest |