diff --git a/.github/workflows/ConsistencyCheck.yml b/.github/workflows/ConsistencyCheck.yml index 3d9438e..7278573 100644 --- a/.github/workflows/ConsistencyCheck.yml +++ b/.github/workflows/ConsistencyCheck.yml @@ -21,13 +21,13 @@ jobs: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 # download Lemontree.Automation on a runner and setup the license - - uses: LieberLieber/setup-LemonTree.Automation@v5 + - uses: LieberLieber/setup-LemonTree.Automation@v6 id: GetLTA with: License: ${{secrets.LTALICENSE}} diff --git a/.github/workflows/Create Pull RequestOnPush.yml b/.github/workflows/Create Pull RequestOnPush.yml index a067573..3c7037f 100644 --- a/.github/workflows/Create Pull RequestOnPush.yml +++ b/.github/workflows/Create Pull RequestOnPush.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Check out repository code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Extract branch name shell: bash run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT diff --git a/.github/workflows/DockerConsistencyCheck.yml b/.github/workflows/DockerConsistencyCheck.yml index de845cc..e7cd42c 100644 --- a/.github/workflows/DockerConsistencyCheck.yml +++ b/.github/workflows/DockerConsistencyCheck.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 diff --git a/.github/workflows/ModelCheck.yml b/.github/workflows/ModelCheck.yml index 5691c73..470969f 100644 --- a/.github/workflows/ModelCheck.yml +++ b/.github/workflows/ModelCheck.yml @@ -16,7 +16,7 @@ jobs: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 diff --git a/.github/workflows/RebasePrByComments.yml b/.github/workflows/RebasePrByComments.yml index 4b75156..a765f4c 100644 --- a/.github/workflows/RebasePrByComments.yml +++ b/.github/workflows/RebasePrByComments.yml @@ -21,11 +21,11 @@ jobs: shell: pwsh runs-on: windows-latest timeout-minutes: 15 - if: ${{ github.event.issue.pull_request && github.event.comment.body == '/rebase/'}} + if: ${{ github.event.issue.pull_request && github.event.comment.body == '/rebase/' && (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR')}} steps: - name: Post start message in PR - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | await github.rest.issues.createComment({ @@ -37,7 +37,7 @@ jobs: - name: Retrieve Rull Request details id: pr_details - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: result-encoding: string script: | @@ -57,24 +57,29 @@ jobs: console.log(`Base: ${triggeredPR.base.ref}`) core.setOutput('number', triggeredPR.number) core.setOutput('head', triggeredPR.head.ref) + core.setOutput('head_sha', triggeredPR.head.sha) core.setOutput('base', triggeredPR.base.ref) - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 - ref: ${{steps.pr_details.outputs.head}} #head instead of base for rebase + ref: ${{steps.pr_details.outputs.head_sha}} #head instead of base for rebase persist-credentials: false token: ${{secrets.PAT}} #If default token of automation user is used, no workflows for merge commit are triggered - name: Configure merge driver for EA files + env: + PR_HEAD_REF: ${{steps.pr_details.outputs.head}} + PR_HEAD_SHA: ${{steps.pr_details.outputs.head_sha}} run: | + git switch -C "$env:PR_HEAD_REF" "$env:PR_HEAD_SHA" Write-Output "Setting lemontree merge-driver to 'no action'" git config merge.lemontree.name "lemontree merge driver" git config merge.lemontree.driver "echo Do nothing, manual merge required" # download Lemontree.Automation on a runner and setup the license - - uses: LieberLieber/setup-LemonTree.Automation@v5 + - uses: LieberLieber/setup-LemonTree.Automation@v6 id: GetLTA with: License: ${{secrets.LTALICENSE}} @@ -166,6 +171,9 @@ jobs: - name: Create commit if: ${{ steps.mergeEA.outputs.result == 0 }} + env: + PR_HEAD_REF: ${{steps.pr_details.outputs.head}} + PR_HEAD_SHA: ${{steps.pr_details.outputs.head_sha}} run: | Write-Output "set user config" git config --global user.name 'LemonTree.Automation' @@ -174,11 +182,13 @@ jobs: git remote set-url origin https://x-access-token:${{secrets.PAT}}@github.com/${{ github.repository }} git status --porcelain --untracked-files=no --ignored=no Write-Output "pushing new commit" - git push --force-with-lease + $branchRef = "refs/heads/$($env:PR_HEAD_REF)" + $lease = "$branchRef`:$($env:PR_HEAD_SHA)" + git push "--force-with-lease=$lease" origin "HEAD:$branchRef" - name: Create Finish Message in PR if: always() - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | await github.rest.issues.createComment({ diff --git a/.github/workflows/SVGUpdate.yml b/.github/workflows/SVGUpdate.yml index e2b0e8c..fab8de5 100644 --- a/.github/workflows/SVGUpdate.yml +++ b/.github/workflows/SVGUpdate.yml @@ -21,13 +21,13 @@ jobs: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 # download Lemontree.Automation on a runner and setup the license - - uses: LieberLieber/setup-LemonTree.Automation@v5 + - uses: LieberLieber/setup-LemonTree.Automation@v6 id: GetLTA with: License: ${{secrets.LTALICENSE}} diff --git a/.github/workflows/TriggerMergeByComments.yml b/.github/workflows/TriggerMergeByComments.yml index fb9a88a..a6b4583 100644 --- a/.github/workflows/TriggerMergeByComments.yml +++ b/.github/workflows/TriggerMergeByComments.yml @@ -78,7 +78,7 @@ jobs: steps: - name: Post start message in PR - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | await github.rest.issues.createComment({ @@ -90,7 +90,7 @@ jobs: - name: Retrieve Rull Request details id: pr_details - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: result-encoding: string script: | @@ -112,7 +112,7 @@ jobs: core.setOutput('head', triggeredPR.head.ref) core.setOutput('base', triggeredPR.base.ref) - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 @@ -179,7 +179,7 @@ jobs: copy ".git\lfs\objects\$shaPart1\$shaPart2\$sha" "${{env.ModelName}}_head.${{env.ModelExtension}}" # download Lemontree.Automation on a runner and setup the license - - uses: LieberLieber/setup-LemonTree.Automation@v5 + - uses: LieberLieber/setup-LemonTree.Automation@v6 id: GetLTA with: License: ${{secrets.LTALICENSE}} @@ -215,7 +215,7 @@ jobs: } - name: Archive Model Files - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: Model File Archive path: "*.eap*" @@ -243,7 +243,7 @@ jobs: - name: Create Finish Message in PR if: always() - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | await github.rest.issues.createComment({ diff --git a/.github/workflows/UpdateReviewSessionFilesPullRequestsBaseCommit.yml b/.github/workflows/UpdateReviewSessionFilesPullRequestsBaseCommit.yml index 0255143..88b7696 100644 --- a/.github/workflows/UpdateReviewSessionFilesPullRequestsBaseCommit.yml +++ b/.github/workflows/UpdateReviewSessionFilesPullRequestsBaseCommit.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Check for related Pull Requests id: linked_prs - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: result-encoding: string script: | @@ -51,14 +51,14 @@ jobs: $prList = $env:jsVar | ConvertFrom-Json Write-Output "count=$($prList.length)" >> $env:GITHUB_OUTPUT - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 if: ${{ steps.checkNumber.outputs.count > 0}} with: lfs: true fetch-depth: 0 # download Lemontree.Automation on a runner and setup the license - - uses: LieberLieber/setup-LemonTree.Automation@v5 + - uses: LieberLieber/setup-LemonTree.Automation@v6 if: ${{ steps.checkNumber.outputs.count > 0}} id: GetLTA with: @@ -175,7 +175,7 @@ jobs: - name: CreateComments if: ${{ steps.checkNumber.outputs.count > 0}} - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const prList = JSON.parse(`${{steps.WorkOnPr.outputs.result}}`) diff --git a/.github/workflows/downloadPostCommitXmi.yml b/.github/workflows/downloadPostCommitXmi.yml index 2152d3b..8390904 100644 --- a/.github/workflows/downloadPostCommitXmi.yml +++ b/.github/workflows/downloadPostCommitXmi.yml @@ -26,7 +26,7 @@ jobs: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 @@ -56,7 +56,7 @@ jobs: exit 0 - name: Archive Session Files - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: Post Commit XMi path: ".\\*.xmi" #${{ steps.downloadXmi.outputs.result }} diff --git a/.github/workflows/publishComponents.yml b/.github/workflows/publishComponents.yml index e9c316f..6ffd7cf 100644 --- a/.github/workflows/publishComponents.yml +++ b/.github/workflows/publishComponents.yml @@ -23,13 +23,13 @@ jobs: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 # download Lemontree.Automation on a runner and setup the license - - uses: LieberLieber/setup-LemonTree.Automation@v5 + - uses: LieberLieber/setup-LemonTree.Automation@v6 id: GetLTA with: License: ${{secrets.LTALICENSE}} @@ -45,7 +45,7 @@ jobs: # &"${{env.LemonTreeAutomationExecutable}}" import --Model ${{env.ComponentModelShortCut}} --Components "*.mpms" - name: Archive Session Files - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: Model Components path: "*.mpms" diff --git a/.github/workflows/publishReviewSession.yml b/.github/workflows/publishReviewSession.yml index 45bc687..3207ecb 100644 --- a/.github/workflows/publishReviewSession.yml +++ b/.github/workflows/publishReviewSession.yml @@ -28,7 +28,7 @@ jobs: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 @@ -51,7 +51,7 @@ jobs: - name: Create sessionfile name id: session_file - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: result-encoding: string script: | @@ -83,7 +83,7 @@ jobs: - name: Post new model comment to PR if: steps.baseDownload.outputs.result == 'notFound' - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | await github.rest.issues.createComment({ @@ -107,7 +107,7 @@ jobs: copy ".git\lfs\objects\$shaPart1\$shaPart2\$sha" "${{env.ModelName}}_head.${{env.ModelExtension}}" # download Lemontree.Automation on a runner and setup the license - - uses: LieberLieber/setup-LemonTree.Automation@v5 + - uses: LieberLieber/setup-LemonTree.Automation@v6 id: GetLTA with: License: ${{secrets.LTALICENSE}} @@ -193,7 +193,7 @@ jobs: - name: Archive Session Files if: steps.baseDownload.outputs.result == 'downloaded' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: Review Session File path: ${{ steps.session_file.outputs.result }} @@ -201,7 +201,7 @@ jobs: - name: Create PR comment if: steps.baseDownload.outputs.result == 'downloaded' - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | await github.rest.issues.createComment({ diff --git a/.github/workflows/validateIncQuery.yml b/.github/workflows/validateIncQuery.yml index e0cdbc9..759fd1c 100644 --- a/.github/workflows/validateIncQuery.yml +++ b/.github/workflows/validateIncQuery.yml @@ -21,7 +21,7 @@ jobs: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 @@ -83,7 +83,7 @@ jobs: - name: Create PR comment if: ${{ steps.find-pull-request.outputs.number > 0}} #only makes sense if we have a PR for the branch - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | await github.rest.issues.createComment({