remove zone id #13
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: Frontend CI/CD | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'frontend/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'frontend/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set Docker image tag based on commit SHA | |
id: get-sha | |
run: echo "::set-output name=sha_tag::$(git rev-parse --short HEAD)" | |
- name: Build Docker image | |
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/plotter-frontend:${{ steps.get-sha.outputs.sha_tag }} ./frontend | |
- name: Login to DockerHub | |
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | |
- name: Push Docker image to DockerHub | |
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/plotter-frontend:${{ steps.get-sha.outputs.sha_tag }} |