Skip to content

add Docker support with Dockerfile, docker-compose, and nginx configu… #1

add Docker support with Dockerfile, docker-compose, and nginx configu…

add Docker support with Dockerfile, docker-compose, and nginx configu… #1

name: Build and Push
on:
push:
branches:
- main
env:
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/bamazon:latest
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
tags: ${{ env.IMAGE_NAME }}
cache-from: type=gha
cache-to: type=gha,mode=max