Skip to content

fix parent

fix parent #22

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main
release:
types:
- published
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
docker buildx create --use
# If the event is a release, also tag and push with the release version
if [ "${{ github.event_name }}" == "release" ]; then
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/${{ github.repository }}:latest -t ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} --push .
else
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/${{ github.repository }}:latest --push .
fi