Skip to content

Commit ff25523

Browse files
authored
Merge pull request #889 from nextcloud-libraries/chore/workflows
ci: update workflows from organization
2 parents 48204c4 + 3b2b50d commit ff25523

File tree

7 files changed

+31
-86
lines changed

7 files changed

+31
-86
lines changed

.github/workflows/block-unconventional-commits.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
@@ -27,7 +27,9 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
31+
with:
32+
persist-credentials: false
3133

3234
- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0
3335
with:

.github/workflows/dependabot-approve-merge.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
@@ -9,7 +9,7 @@
99
name: Dependabot
1010

1111
on:
12-
pull_request_target:
12+
pull_request_target: # zizmor: ignore[dangerous-triggers]
1313
branches:
1414
- main
1515
- master
@@ -24,7 +24,7 @@ concurrency:
2424

2525
jobs:
2626
auto-approve-merge:
27-
if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]'
27+
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'renovate[bot]'
2828
runs-on: ubuntu-latest
2929
permissions:
3030
# for hmarr/auto-approve-action to approve PRs

.github/workflows/documentation.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
@@ -13,36 +13,24 @@ on:
1313
release:
1414
types: [published]
1515

16+
permissions:
17+
contents: write
18+
1619
jobs:
1720
build-and-deploy:
1821
runs-on: ubuntu-latest
1922

2023
name: Build and deploy
2124
steps:
22-
- name: Check actor permission level
23-
# Only allow admin to deploy on release
24-
if: github.event.release
25-
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2
26-
with:
27-
require: write
28-
2925
- name: Checkout
30-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31-
32-
- name: Read package.json node and npm engines version
33-
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
34-
id: versions
26+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3527
with:
36-
fallbackNode: '^20'
37-
fallbackNpm: '^10'
28+
persist-credentials: false
3829

39-
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
40-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
30+
- name: Set up node
31+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
4132
with:
42-
node-version: ${{ steps.versions.outputs.nodeVersion }}
43-
44-
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
45-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
33+
node-version-file: 'package.json'
4634

4735
- name: Install dependencies & build
4836
env:
@@ -54,7 +42,7 @@ jobs:
5442
5543
- name: Deploy
5644
# Only deploy on release
57-
if: github.event.release && contains(github.ref, 'main')
45+
if: github.event.release
5846
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
5947
with:
6048
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/fixup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors

.github/workflows/node-test.yml

Lines changed: 10 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
@@ -24,53 +24,20 @@ concurrency:
2424
cancel-in-progress: true
2525

2626
jobs:
27-
changes:
28-
runs-on: ubuntu-latest
29-
30-
outputs:
31-
src: ${{ steps.changes.outputs.src}}
32-
33-
steps:
34-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
35-
id: changes
36-
continue-on-error: true
37-
with:
38-
filters: |
39-
src:
40-
- '.github/workflows/**'
41-
- 'cypress/**'
42-
- 'lib/**'
43-
- 'package.json'
44-
- 'package-lock.json'
45-
- 'tsconfig.json'
46-
- '**.js'
47-
- '**.ts'
48-
- '**.vue'
49-
5027
test:
5128
runs-on: ubuntu-latest
52-
53-
needs: changes
54-
if: needs.changes.outputs.src != 'false'
29+
name: node-tests
5530

5631
steps:
5732
- name: Checkout
58-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59-
60-
- name: Read package.json node and npm engines version
61-
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
62-
id: versions
33+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6334
with:
64-
fallbackNode: '^22'
65-
fallbackNpm: '^10.5'
35+
persist-credentials: false
6636

67-
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
68-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
37+
- name: Set up node
38+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
6939
with:
70-
node-version: ${{ steps.versions.outputs.nodeVersion }}
71-
72-
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
73-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
40+
node-version-file: 'package.json'
7441

7542
- name: Install dependencies & build
7643
env:
@@ -86,20 +53,8 @@ jobs:
8653
run: npm run test:coverage --if-present
8754

8855
- name: Collect coverage
89-
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
56+
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
9057
with:
9158
files: ./coverage/lcov.info
92-
93-
summary:
94-
permissions:
95-
contents: none
96-
runs-on: ubuntu-latest
97-
needs: [changes, test]
98-
99-
if: always()
100-
101-
name: test-summary
102-
103-
steps:
104-
- name: Summary status
105-
run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi
59+
env:
60+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2727
with:
2828
persist-credentials: false
2929

.github/workflows/reuse.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2323
with:
2424
persist-credentials: false
2525

2626
- name: REUSE Compliance Check
27-
uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5.0.0
27+
uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0

0 commit comments

Comments
 (0)