RMMT-API Image Build #4
This file contains hidden or 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: RMMT-API Image Build | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- './**' | |
pull_request: | |
branches: ["main"] | |
paths: | |
- './**' | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
name: Build image and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PAT_TOKEN }} | |
- name: Build and push api | |
working-directory: . | |
run: | | |
docker build . --file Dockerfile --tag ${{ vars.DOCKER_USERNAME }}/rmmt-api:latest | |
docker push ${{ vars.DOCKER_USERNAME }}/rmmt-api:latest |