docker-backuppc/.github/workflows/release.yml

50 lines
1.6 KiB
YAML
Raw Normal View History

2023-10-27 11:39:58 +02:00
name: release
on:
push:
tags: ["4.*"]
jobs:
2023-10-27 14:21:32 +02:00
main:
2023-10-27 14:23:36 +02:00
uses: ./.github/workflows/main.yml
2023-10-27 11:39:58 +02:00
docker:
2023-10-27 16:06:02 +02:00
needs: main
2023-10-27 11:39:58 +02:00
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build, tag and push Docker multi-arch manifest to Docker Hub
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --use
VERSION="$(cat VERSION)"
echo "Docker tag is: ${VERSION}"
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --tag adferrand/backuppc:${VERSION} --tag adferrand/backuppc:4 --tag adferrand/backuppc --push .
2023-10-27 14:21:32 +02:00
github:
2023-10-27 16:06:02 +02:00
needs: docker
2023-10-27 14:21:32 +02:00
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Get version and changelog
id: get-version
run: |
2023-10-27 16:06:02 +02:00
VERSION="$(cat VERSION)"
2023-10-27 14:21:32 +02:00
echo "Version is: ${VERSION}"
echo "VERSION=${VERSION}" >> "${GITHUB_OUTPUT}"
python utils/extract_changelog.py "${VERSION}" > extracted_changelog.md
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
name: Docker BackupPC ${{ steps.get-version.outputs.VERSION }}
body_path: extracted_changelog.md