Skip to content

Commit 0424c8b

Browse files
authored
Merge pull request #5477 from LibreSign/chore/update-workflows
chore: update workflows
2 parents 44bb47f + f61eba9 commit 0424c8b

4 files changed

Lines changed: 28 additions & 7 deletions

File tree

.github/workflows/appstore-build-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
- name: Get app version number
4545
id: app-version
46-
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
46+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
4747
with:
4848
filename: ${{ env.APP_NAME }}/appinfo/info.xml
4949
expression: "//info//version/text()"
@@ -54,7 +54,7 @@ jobs:
5454
5555
- name: Get appinfo data
5656
id: appinfo
57-
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
57+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
5858
with:
5959
filename: ${{ env.APP_NAME }}/appinfo/info.xml
6060
expression: "//info//dependencies//nextcloud/@min-version"
@@ -178,7 +178,7 @@ jobs:
178178
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
179179
180180
- name: Attach tarball to github release
181-
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2
181+
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2
182182
id: attach_to_release
183183
with:
184184
repo_token: ${{ secrets.GITHUB_TOKEN }}
@@ -188,7 +188,7 @@ jobs:
188188
overwrite: true
189189

190190
- name: Upload app to Nextcloud appstore
191-
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
191+
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3
192192
with:
193193
app_name: ${{ env.APP_NAME }}
194194
appstore_token: ${{ secrets.APPSTORE_TOKEN }}

.github/workflows/phpunit-sqlite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
pull-requests: read
4141

4242
outputs:
43-
src: ${{ steps.changes.outputs.src }}
43+
src: ${{ steps.changes.outputs.src}}
4444

4545
steps:
4646
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2

.github/workflows/psalm.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,15 @@ jobs:
4848
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4949

5050
- name: Install dependencies
51-
run: composer i
51+
run: |
52+
composer remove nextcloud/ocp --dev --no-scripts
53+
composer i
54+
55+
- name: Check for vulnerable PHP dependencies
56+
run: composer require --dev roave/security-advisories:dev-latest
57+
58+
- name: Install nextcloud/ocp
59+
run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies
5260

5361
- name: Run coding standards check
54-
run: composer run psalm -- --output-format=github
62+
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,19 @@ clean-dev:
8282
test: composer
8383
$(CURDIR)/vendor/bin/phpunit -c phpunit.xml
8484

85+
.PHONY: update-workflows
86+
update-workflows:
87+
@echo "Updating GitHub workflows from the Nextcloud template repository..."
88+
@if [ ! -d ./.github/workflows/ ]; then \
89+
echo "Error: .github/workflows does not exist"; \
90+
exit 1; \
91+
fi
92+
@temp=$(mktemp -d); \
93+
git clone --depth=1 https://github.com/nextcloud/.github.git "$temp"; \
94+
rsync -vr --existing --include='*/' --include='*.yml' --exclude='*' "$temp/workflow-templates/" ./.github/workflows/; \
95+
rm -rf "$temp"; \
96+
echo "Workflows updated successfully."
97+
8598
updateocp:
8699
php -r 'if (shell_exec("diff -qr ../../lib/public/ vendor/nextcloud/ocp/OCP/")) {\exec("rm -rf vendor/nextcloud/ocp/OCP/");\exec("cp -r ../../lib/public vendor/nextcloud/ocp/OCP/");}'
87100

0 commit comments

Comments
 (0)