Skip to content

Build and publish backend API docker image #4

Build and publish backend API docker image

Build and publish backend API docker image #4

name: Build and publish backend API docker image
on:
[workflow_dispatch]
jobs:
publish_image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: checkout
uses: actions/checkout@v4
- name: lowercase the repository name
run: |
echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}"
- name: login
run: |
echo ${{ secrets.GITHUB_TOKEN}} | docker login --username ${{ github.actor }} --password-stdin ghcr.io
- name: build
run: |
cd air-quality-backend
docker build . -t ghcr.io/${REPO}/vairify-backend-api:latest -f Dockerfile.api
- name: publish
run: |
docker push ghcr.io/${REPO}/vairify-backend-api:latest