Skip to content

Merge pull request #28 from Andes-hosting/Mauricio-development #5

Merge pull request #28 from Andes-hosting/Mauricio-development

Merge pull request #28 from Andes-hosting/Mauricio-development #5

name: Build and publish release with docker image
on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
push_to_registry:
name: Push Docker image to Github Package
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# create_github_release:
# name: Create Github Release
# runs-on: ubuntu-latest
# needs: push_to_registry
# steps:
# - name: Create Release Notes
# uses: google-github-actions/release-please-action@v4
# with:
# release-type: simple
# token: ${{ secrets.GITHUB_TOKEN }}