Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/vshn/appcat-cookiecutter",
"commit": "8f29fab7ec7458dacdc42e208806c5669162d87f",
"commit": "69411951bb5ca1ff063313896b252d274ec50c16",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -15,7 +15,7 @@
".github/changelog-configuration.json"
],
"_template": "https://github.com/vshn/appcat-cookiecutter",
"_commit": "8f29fab7ec7458dacdc42e208806c5669162d87f"
"_commit": "69411951bb5ca1ff063313896b252d274ec50c16"
}
},
"directory": null
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
114 changes: 114 additions & 0 deletions .github/workflows/pr.yml.rej
Original file line number Diff line number Diff line change
@@ -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 }}
-
24 changes: 24 additions & 0 deletions .github/workflows/pre-release.yml.rej
Original file line number Diff line number Diff line change
@@ -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
Loading