From 02513b1690e929a30e79851947031067e2c829a6 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 2 Oct 2022 12:46:10 +0200 Subject: [PATCH 1/2] Define target for docker build image --- action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/action.yml b/action.yml index 2438513..50f42ac 100644 --- a/action.yml +++ b/action.yml @@ -18,6 +18,11 @@ inputs: description: "Path to the Dockerfile" required: true + target: + description: "Target to build" + default: "" + required: false + Username: description: "Username for registry" required: true @@ -44,6 +49,7 @@ runs: run: | echo "::set-output name=sha_short::${{ inputs.DOCKER_TAG }}" echo "::set-output name=DOCKER_IMAGE::${{ inputs.DOCKER_IMAGE }}" + echo "::set-output name=BUILD_ARGS::${{ inputs.build-args }}" - name: Set up Docker Context for Buildx shell: bash @@ -92,6 +98,7 @@ runs: file: ${{ inputs.file }} push: true pull: true + target: "${{inputs.target}}" build-args: | ${{ steps.vars.outputs.BUILD_ARGS }} cache-from: type=local,src=/tmp/.buildx-cache From b6d9c28cd4c284474f75abda59124d2a712b72c6 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 2 Oct 2022 12:52:27 +0200 Subject: [PATCH 2/2] Automate release process --- .github/workflows/release.yaml | 35 +++++++++++++++++++++++++++ release-changelog-builder-config.json | 33 +++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .github/workflows/release.yaml create mode 100644 release-changelog-builder-config.json diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..ac8a7f7 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,35 @@ +name: Release +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - '[0-9]+.[0-9]+.[0-9]+*' # Push events to any matching semantic tag. For example, 1.10.1 or 2.0.0 or 3.0.0-alpha. + # For more details, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet + # and https://docs.npmjs.com/about-semantic-versioning + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Build changelog + id: build_changelog + uses: mikepenz/release-changelog-builder-action@main + with: + configuration: 'release-changelog-builder-config.json' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create release + id: create_release + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: ${{steps.build_changelog.outputs.changelog}} + draft: false + prerelease: false \ No newline at end of file diff --git a/release-changelog-builder-config.json b/release-changelog-builder-config.json new file mode 100644 index 0000000..3581a5a --- /dev/null +++ b/release-changelog-builder-config.json @@ -0,0 +1,33 @@ +{ + "categories": [ + { + "title": "## 🐛 Bug Fixes", + "labels": ["bug"] + }, + { + "title": "## 📃 Documentation Updates", + "labels": ["documentation"] + }, + { + "title": "## ✨ Enhancements", + "labels": ["enhancement"] + } + ], + "ignore_labels": ["ignore", "invalid", "wontfix"], + "sort": "ASC", + "template": "${{CATEGORIZED_COUNT}} changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}\n\n## Other Updates\n\n${{UNCATEGORIZED}}\n", + "pr_template": "- ${{TITLE}} (#${{NUMBER}})", + "empty_template": "No Changes", + "label_extractor": [ + { + "pattern": "(.) (.+)", + "target": "$1" + } + ], + "max_tags_to_fetch": 200, + "max_pull_requests": 250, + "max_back_track_time_days": 90, + "tag_resolver": { + "method": "semver" + } + } \ No newline at end of file