Skip to content

Commit 27149b7

Browse files
Merge pull request #53115 from nextcloud/ci/noid/more-action-hardening
2 parents 74d164e + a4bbdef commit 27149b7

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/block-outdated-3rdparty.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,24 @@ jobs:
5656
core.exportVariable('server_ref', match[0]);
5757
console.log('Setting server_ref to ' + match[0]);
5858
} else {
59-
console.log('Not based on master/main/stable*, so skipping freeze check');
59+
console.log('Not based on master/main/stable*, so skipping outdated 3rdparty check');
6060
}
6161
}
6262
6363
- name: Last 3rdparty commit on target branch
64+
if: ${{ env.server_ref != '' }}
6465
id: target
6566
run: |
6667
echo "commit=$(git ls-remote https://github.com/nextcloud/3rdparty refs/heads/${{ env.server_ref }} | awk '{ print $1}')" >> "$GITHUB_OUTPUT"
6768
6869
- name: Compare if 3rdparty commits are different
70+
if: ${{ env.server_ref != '' }}
6971
run: |
7072
echo '3rdparty/ seems to not point to the last commit of the dedicated branch:'
7173
echo 'Branch has: ${{ steps.actual.outputs.commit }}'
7274
echo '${{ env.server_ref }} has: ${{ steps.target.outputs.commit }}'
7375
7476
- name: Fail if 3rdparty commits are different
75-
if: ${{ steps.changes.outputs.src != 'false' && steps.actual.outputs.commit != steps.target.outputs.commit }}
77+
if: ${{ env.server_ref != '' && steps.changes.outputs.src != 'false' && steps.actual.outputs.commit != steps.target.outputs.commit }}
7678
run: |
7779
exit 1

.github/workflows/command-pull-3rdparty.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
core.exportVariable('server_ref', match[0]);
6262
console.log('Setting server_ref to ' + match[0]);
6363
} else {
64-
console.log('Not based on master/main/stable*, so skipping freeze check');
64+
console.log('Not based on master/main/stable*, so skipping pull 3rdparty command');
6565
}
6666
}
6767

.github/workflows/generate-release-changelog.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ jobs:
5050
PREVIOUS_TAG=$(echo "$TAGS" | grep -v 'rc\|beta\|alpha' | sed -n '2p')
5151
echo "CURRENT_TAG=$CURRENT_TAG" >> $GITHUB_ENV
5252
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV
53-
54-
- name: Verify current tag
53+
54+
# Since this action only runs on nextcloud-releases, ignoring is okay
55+
- name: Verify current tag # zizmor: ignore[template-injection]
5556
run: |
5657
if [ "${{ github.ref_name }}" != "${{ env.CURRENT_TAG }}" ]; then
5758
echo "Current tag does not match the release tag. Exiting."
@@ -71,15 +72,17 @@ jobs:
7172
run: |
7273
echo '{"username": "github-actions"}' > github_helper/credentials.json
7374
74-
- name: Generate changelog between ${{ env.PREVIOUS_TAG }} and ${{ github.ref_name }}
75+
# Since this action only runs on nextcloud-releases, ignoring is okay
76+
- name: Generate changelog between ${{ env.PREVIOUS_TAG }} and ${{ github.ref_name }} # zizmor: ignore[template-injection]
7577
env:
7678
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7779
run: |
7880
cd github_helper/changelog
7981
composer install
8082
php index.php generate:changelog --no-bots --format=forum server ${{ env.PREVIOUS_TAG }} ${{ github.ref_name }} > changelog.md
8183
82-
- name: Set changelog to release
84+
# Since this action only runs on nextcloud-releases, ignoring is okay
85+
- name: Set changelog to release # zizmor: ignore[template-injection]
8386
env:
8487
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8588
run: |

0 commit comments

Comments
 (0)