Skip to content

Adding GitHub Action for [build|push]ing the Docker image #3

Adding GitHub Action for [build|push]ing the Docker image

Adding GitHub Action for [build|push]ing the Docker image #3

Workflow file for this run

name: New release
on:
push:
tags:
- v**
pull_request:
branches: ["main"]
jobs:
release:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: stat-utils/stat-fastapi:latest