Skip to content

Commit e48c7d2

Browse files
committed
ci: update workflows from organization
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent 97edace commit e48c7d2

File tree

8 files changed

+35
-26
lines changed

8 files changed

+35
-26
lines changed

.github/workflows/command-l10n-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
steps:
4949
- name: Checkout ${{ needs.init.outputs.head_ref }}
50-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
50+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
5151
with:
5252
fetch-depth: 0
5353
ref: ${{ needs.init.outputs.head_ref }}
@@ -65,7 +65,7 @@ jobs:
6565
id: versions
6666

6767
- name: Set up node
68-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
68+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
6969
with:
7070
node-version: ${{ steps.versions.outputs.node-version }}
7171

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

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
6-
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
6+
# SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
77
# SPDX-License-Identifier: MIT
88

9-
name: Dependabot
9+
name: Auto approve Dependabot PRs
1010

1111
on:
1212
pull_request_target: # zizmor: ignore[dangerous-triggers]
@@ -29,6 +29,8 @@ jobs:
2929
permissions:
3030
# for hmarr/auto-approve-action to approve PRs
3131
pull-requests: write
32+
# for alexwilson/enable-github-automerge-action to approve PRs
33+
contents: write
3234

3335
steps:
3436
- name: Disabled on forks
@@ -37,13 +39,20 @@ jobs:
3739
echo 'Can not approve PRs from forks'
3840
exit 1
3941
42+
- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
43+
id: branchname
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
4047
# GitHub actions bot approve
41-
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
48+
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
49+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
4250
with:
4351
github-token: ${{ secrets.GITHUB_TOKEN }}
4452

45-
# Nextcloud bot approve and merge request
46-
- uses: ahmadnassri/action-dependabot-auto-merge@45fc124d949b19b6b8bf6645b6c9d55f4f9ac61a # v2
53+
# Enable GitHub auto merge
54+
- name: Auto merge
55+
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
56+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
4757
with:
48-
target: minor
49-
github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}
58+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
name: Build and deploy
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2727
with:
2828
persist-credentials: false
2929

@@ -32,7 +32,7 @@ jobs:
3232
id: versions
3333

3434
- name: Set up node
35-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
35+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
3636
with:
3737
node-version: ${{ steps.versions.outputs.node-version }}
3838

.github/workflows/lint-stylelint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2929
with:
3030
persist-credentials: false
3131

@@ -34,7 +34,7 @@ jobs:
3434
id: versions
3535

3636
- name: Set up node
37-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
37+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
3838
with:
3939
node-version: ${{ steps.versions.outputs.node-version }}
4040

.github/workflows/node-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
33+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3434
with:
3535
persist-credentials: false
3636

@@ -39,7 +39,7 @@ jobs:
3939
id: versions
4040

4141
- name: Set up node
42-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
42+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
4343
with:
4444
node-version: ${{ steps.versions.outputs.node-version }}
4545

@@ -60,7 +60,7 @@ jobs:
6060
run: npm run test:coverage --if-present
6161

6262
- name: Collect coverage
63-
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
63+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
6464
with:
6565
files: ./coverage/lcov.info
6666
env:

.github/workflows/npm-audit-fix.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
id: checkout
34-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
34+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3535
with:
3636
persist-credentials: false
3737
ref: ${{ matrix.branches }}
@@ -42,7 +42,7 @@ jobs:
4242
id: versions
4343

4444
- name: Set up node
45-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
45+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
4646
with:
4747
node-version: ${{ steps.versions.outputs.node-version }}
4848

@@ -63,7 +63,7 @@ jobs:
6363
6464
- name: Create Pull Request
6565
if: steps.checkout.outcome == 'success'
66-
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
66+
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
6767
with:
6868
token: ${{ secrets.COMMAND_BOT_PAT }}
6969
commit-message: 'fix(deps): Fix npm audit'

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ on:
1313
types: [published]
1414

1515
permissions:
16+
id-token: write # Required for OIDC
1617
contents: read
17-
packages: write
1818

1919
jobs:
2020
publish:
2121
runs-on: ubuntu-latest
2222
name: Build and publish to npm
23+
environment: npm-publish
2324

2425
steps:
2526
- name: Checkout
26-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2728
with:
2829
persist-credentials: false
2930

@@ -32,9 +33,10 @@ jobs:
3233
id: versions
3334

3435
- name: Set up node
35-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
36+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
3637
with:
3738
node-version: ${{ steps.versions.outputs.node-version }}
39+
registry-url: https://registry.npmjs.org
3840

3941
- name: Set up npm
4042
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
@@ -54,7 +56,7 @@ jobs:
5456
env:
5557
CYPRESS_INSTALL_BINARY: 0
5658
run: |
57-
npm ci
59+
npm ci --ignore-scripts
5860
npm run build --if-present
5961
6062
- name: Fetch latest tag
@@ -73,8 +75,6 @@ jobs:
7375

7476
- name: Publish
7577
run: |
76-
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
7778
npm publish --tag $RELEASE_GROUP
7879
env:
79-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8080
RELEASE_GROUP: ${{ (contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha')) && 'next' || ((steps.latest-tag.outputs.LATEST_TAG != github.event.release.tag_name) && 'stable' || 'latest') }}

.github/workflows/reuse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2323
with:
2424
persist-credentials: false
2525

0 commit comments

Comments
 (0)