From a9d5cfa09e8c0da24937db697918b00fbde1875c Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Fri, 27 Oct 2023 14:21:32 +0200 Subject: [PATCH] Setup full workflows --- .github/workflows/main.yml | 1 + .github/workflows/release.yml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3318251..ca0d9b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: branches: [master] pull_request: branches: [master] + workflow_call: concurrency: group: ${{ github.ref }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8fbb6e8..b4bc39e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,8 @@ on: tags: ["4.*"] jobs: + main: + uses: adferrand/docker-backuppc/.github/workflows/main.yml@${{ vars.GITHUB_SHA }} docker: runs-on: ubuntu-latest steps: @@ -22,3 +24,24 @@ jobs: 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 . + github: + 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: | + VERSION="${cat VERSION}" + 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