Skip to content

Revert "Production debugging let's go" #17

Revert "Production debugging let's go"

Revert "Production debugging let's go" #17

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