diff --git a/.github/workflows/backend-build-push.yaml b/.github/workflows/backend-build-push.yaml new file mode 100644 index 0000000..7ec659b --- /dev/null +++ b/.github/workflows/backend-build-push.yaml @@ -0,0 +1,34 @@ +name: backend-build-push +on: + push: + paths: + - 'backend/**' + + branches: + - master + workflow_dispatch: + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Login to Dockerhub + id: docker-hub + env: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_PASSWORD}} + run: | + docker login -u $username -p $password + + - name: Docker Build and Publish + uses: docker/build-push-action@v2 + with: + context: ./backend + file: ./backend/Dockerfile + push: true + tags: frnn4268/easyparksystem-backend:${{github.run_number}} \ No newline at end of file diff --git a/.github/workflows/frontend-build-push.yaml b/.github/workflows/frontend-build-push.yaml new file mode 100644 index 0000000..eeaf3e4 --- /dev/null +++ b/.github/workflows/frontend-build-push.yaml @@ -0,0 +1,34 @@ +name: frontend-build-push +on: + push: + paths: + - 'frontend/**' + + branches: + - master + workflow_dispatch: + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Login to Dockerhub + id: docker-hub + env: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_PASSWORD}} + run: | + docker login -u $username -p $password + + - name: Docker Build and Publish + uses: docker/build-push-action@v2 + with: + context: ./frontend + file: ./frontend/Dockerfile + push: true + tags: frnn4268/easyparksystem-frontend:${{github.run_number}} \ No newline at end of file