Skip to content

ci: get the Dockerfile rolling #1

ci: get the Dockerfile rolling

ci: get the Dockerfile rolling #1

Workflow file for this run

#==============================================================================#
# Author: Dominik Müller #
# Copyright: 2024 AG-RAIMIA-Müller, University of Augsburg, #
# University of Augsburg #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
#==============================================================================#
# This workflow will:
# - create a CHANGELOG between latest tag and current tag
# - release the package on GitHub
# - dockerize the package on GitHub (GitHub Container Registry)
# - upload it to PyPI
name: Package Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+'
jobs:
release:
name: Release on GitHub
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Create CHANGELOG
id: changelog
uses: Requarks/changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
excludeTypes: other,style
- name: Create Release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: aucmedi_${{ github.ref }}
body: ${{ steps.changelog.outputs.changes }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dockerize:
name: Dockerize on GitHub
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}