From beaffde35621d92add35a0b27ce24c7501a7f519 Mon Sep 17 00:00:00 2001 From: Kidswiss <7460550+Kidswiss@users.noreply.github.com> Date: Thu, 12 Feb 2026 13:26:45 +0000 Subject: [PATCH] chore: accept new Cruft update --- .cruft.json | 4 +- .github/workflows/pr.yml | 2 +- .github/workflows/pr.yml.rej | 114 ++++++++++++++++++++++++++ .github/workflows/pre-release.yml.rej | 24 ++++++ 4 files changed, 141 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pr.yml.rej create mode 100644 .github/workflows/pre-release.yml.rej diff --git a/.cruft.json b/.cruft.json index 28cc085e46..5c4f8be29d 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/vshn/appcat-cookiecutter", - "commit": "8f29fab7ec7458dacdc42e208806c5669162d87f", + "commit": "69411951bb5ca1ff063313896b252d274ec50c16", "checkout": null, "context": { "cookiecutter": { @@ -15,7 +15,7 @@ ".github/changelog-configuration.json" ], "_template": "https://github.com/vshn/appcat-cookiecutter", - "_commit": "8f29fab7ec7458dacdc42e208806c5669162d87f" + "_commit": "69411951bb5ca1ff063313896b252d274ec50c16" } }, "directory": null diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 45e7c2b925..30c5b0f74c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -40,7 +40,7 @@ jobs: steps: - name: Ignore from Changelog if merge to master uses: actions-ecosystem/action-add-labels@v1 - if: github.base_ref == 'master' + if: github.event.action != 'opened' && github.base_ref == 'master' with: labels: ignoreChangelog diff --git a/.github/workflows/pr.yml.rej b/.github/workflows/pr.yml.rej new file mode 100644 index 0000000000..b629d1328a --- /dev/null +++ b/.github/workflows/pr.yml.rej @@ -0,0 +1,114 @@ +diff a/.github/workflows/pr.yml b/.github/workflows/pr.yml (rejected hunks) +@@ -47,6 +47,7 @@ jobs: + with: + one_of: major,minor,patch,documentation,dependency + repo_token: ${{ secrets.GITHUB_TOKEN }} ++ + publish-branch-images: + if: github.event.action != 'closed' && (github.event.pull_request.base.ref != 'develop' || github.event.pull_request.head.ref != 'master') + runs-on: ubuntu-latest +@@ -169,104 +170,3 @@ jobs: + with: + labels: ignoreChangelog + +- create-release: +- if: github.event.pull_request.merged && github.base_ref == 'master' +- runs-on: ubuntu-latest +- steps: +- - name: Check for patch label +- if: contains(github.event.pull_request.labels.*.name, 'patch') || contains(github.event.pull_request.labels.*.name, 'dependency') || contains(github.event.pull_request.labels.*.name, 'documentation') +- id: patch +- run: | +- echo "set=true" >> $GITHUB_OUTPUT +- - name: Check for minor label +- if: contains(github.event.pull_request.labels.*.name, 'minor') +- id: minor +- run: | +- echo "set=true" >> $GITHUB_OUTPUT +- - name: Check for major label +- if: contains(github.event.pull_request.labels.*.name, 'major') +- id: major +- run: | +- echo "set=true" >> $GITHUB_OUTPUT +- +- - uses: actions/checkout@v4 +- with: +- # Make sure we use the right commit to tag +- ref: ${{ github.event.pull_request.merge_commit_sha }} +- # We also need to use the personal access token here. As subsequent +- # actions will not trigger by tags/pushes that use `GITHUB_TOKEN` +- # https://github.com/orgs/community/discussions/25702#discussioncomment-3248819 +- token: ${{ secrets.COMPONENT_ACCESS_TOKEN }} +- # This is broken in checkout@v4... +- # https://github.com/actions/checkout/issues/1781 +- fetch-tags: true +- +- - name: fetch tags +- run: | +- git fetch --tags +- echo "latest tag: $(git describe --tags "$(git rev-list --tags --max-count=1)")" +- echo "TAG_VERSION=$(git describe --tags "$(git rev-list --tags --max-count=1)")" >> $GITHUB_ENV +- +- - name: Extract branch name +- shell: bash +- run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT +- id: extract_branch +- +- # We only run this if any of the release tags is set. +- # For docs and deps we don't do automagic releases +- - name: Increase Tag +- id: tag +- run: | +- patch=${{ steps.patch.outputs.set }} +- minor=${{ steps.minor.outputs.set }} +- major=${{ steps.major.outputs.set }} +- +- major_ver=$(echo '${{ env.TAG_VERSION }}' | cut -d "." -f1) +- minor_ver=$(echo '${{ env.TAG_VERSION }}' | cut -d "." -f2) +- patch_ver=$(echo '${{ env.TAG_VERSION }}' | cut -d "." -f3) +- +- major_ver="${major_ver:1}" +- +- # Check for patch label +- [ ! -z "$patch" ] && [ -z "$minor" ] && [ -z "$major" ] && ((patch_ver++)) || true +- +- # check for minor label +- if [ ! -z "$minor" ] && [ -z "$major" ]; then +- ((minor_ver++)) +- patch_ver=0 +- fi +- +- # Check for major label +- if [ ! -z "$major" ]; then +- ((major_ver++)) +- minor_ver=0 +- patch_ver=0 +- fi +- +- tag="v$major_ver.$minor_ver.$patch_ver" +- echo "new tag $tag" +- git tag $tag +- git push --tags +- echo tag=$tag >> $GITHUB_OUTPUT +- +- - name: Checkout component +- uses: actions/checkout@v4 +- with: +- repository: ${{ env.COMPONENT_REPO }} +- token: ${{ secrets.COMPONENT_ACCESS_TOKEN }} +- ref: "${{ env.APP_NAME }}/${{ github.event.pull_request.number }}/${{ steps.extract_branch.outputs.branch }}" +- fetch-depth: 0 +- +- - name: Update tag and run golden +- run: | +- yq e '.parameters.appcat.images.${{ env.APP_NAME }}.tag="${{ steps.tag.outputs.tag }}"' class/defaults.yml | diff -B class/defaults.yml - | patch class/defaults.yml - || true +- make gen-golden-all +- +- - name: Commit & Push changes +- uses: actions-js/push@master +- with: +- github_token: ${{ secrets.COMPONENT_ACCESS_TOKEN }} +- branch: "${{ env.APP_NAME }}/${{ github.event.pull_request.number }}/${{ steps.extract_branch.outputs.branch }}" +- message: "Update tag" +- repository: ${{ env.COMPONENT_REPO }} +- diff --git a/.github/workflows/pre-release.yml.rej b/.github/workflows/pre-release.yml.rej new file mode 100644 index 0000000000..12272e6d96 --- /dev/null +++ b/.github/workflows/pre-release.yml.rej @@ -0,0 +1,24 @@ +diff a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml (rejected hunks) +@@ -70,7 +70,7 @@ jobs: + exit 1 + + - name: Merge PR +- run: gh pr merge ${{ steps.pr_info.outputs.pr_number }} --merge ++ run: gh pr merge ${{ steps.pr_info.outputs.pr_number }} --merge --admin + env: + GH_TOKEN: ${{ secrets.MERGE_TOKEN }} + +@@ -85,6 +85,13 @@ jobs: + git push origin $NEW_TAG + echo "new_tag=$NEW_TAG" >> $GITHUB_OUTPUT + ++ - name: Fast forward develop to master ++ run: | ++ git checkout develop ++ git merge master --ff-only ++ git push origin develop ++ env: ++ GH_TOKEN: ${{ secrets.MERGE_TOKEN }} + + create-component-release-pr: + needs: create-and-merge-appcat-pr