Skip to content

added port to compose #10

added port to compose

added port to compose #10

name: Docker Image Build and Push
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:run-${{ github.run_id }}-${{ github.run_attempt }}
ghcr.io/${{ github.repository }}:sha-${{ github.sha }}