Skip to content

Publish Docker Image on Release #1

Publish Docker Image on Release

Publish Docker Image on Release #1

name: Publish Docker Image on Release
on:
release:
types:
- published
jobs:
build-and-push:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}/fortsphere:latest
ghcr.io/${{ github.repository }}/fortsphere:${{ github.event.release.tag_name }}
labels: |
org.opencontainers.image.title=Fortsphere
org.opencontainers.image.description="Fortify your digital sphere, one command at a time."
org.opencontainers.image.url=https://github.com/OpenPathfinder/fortSphere
org.opencontainers.image.source=https://github.com/OpenPathfinder/fortSphere.git
org.opencontainers.image.version=${{ github.event.release.tag_name }}
org.opencontainers.image.licenses=MIT
maintainer="Ulises Gascón <[email protected]>"