Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions .github/workflows/block-merge-eol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,23 @@ jobs:

steps:
- name: Set server major version environment
run: |
# retrieve version number from branch reference
server_major=$(echo "${{ github.base_ref }}" | sed -En 's/stable//p')
echo "server_major=$server_major" >> $GITHUB_ENV
echo "current_month=$(date +%Y-%m)" >> $GITHUB_ENV

- name: Checking if ${{ env.server_major }} is EOL
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const regex = /^stable(\d+)$/
const baseRef = context.payload.pull_request.base.ref
const match = baseRef.match(regex)
if (match) {
console.log('Setting server_major to ' + match[1]);
core.exportVariable('server_major', match[1]);
console.log('Setting current_day to ' + (new Date()).toISOString().substr(0, 10));
core.exportVariable('current_day', (new Date()).toISOString().substr(0, 10));
}

- name: Checking if server ${{ env.server_major }} is EOL
if: ${{ env.server_major != '' }}
run: |
curl -s https://raw.githubusercontent.com/nextcloud-releases/updater_server/production/config/major_versions.json \
| jq '.["${{ env.server_major }}"]["eol"] // "9999-99" | . >= "${{ env.current_month }}"' \
| jq '.["${{ env.server_major }}"]["eol"] // "9999-99-99" | . >= "${{ env.current_day }}"' \
| grep -q true
24 changes: 21 additions & 3 deletions .github/workflows/block-merge-freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,29 @@ jobs:

steps:
- name: Register server reference to fallback to master branch
run: |
server_ref="$(if [ '${{ github.base_ref }}' = 'main' ]; then echo -n 'master'; else echo -n '${{ github.base_ref }}'; fi)"
echo "server_ref=$server_ref" >> $GITHUB_ENV
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const baseRef = context.payload.pull_request.base.ref
if (baseRef === 'main' || baseRef === 'master') {
core.exportVariable('server_ref', 'master');
console.log('Setting server_ref to master');
} else {
const regex = /^stable(\d+)$/
const match = baseRef.match(regex)
if (match) {
core.exportVariable('server_ref', match[0]);
console.log('Setting server_ref to ' + match[0]);
} else {
console.log('Not based on master/main/stable*, so skipping freeze check');
}
}

- name: Download version.php from ${{ env.server_ref }}
if: ${{ env.server_ref != '' }}
run: curl 'https://raw.githubusercontent.com/nextcloud/server/${{ env.server_ref }}/version.php' --output version.php

- name: Run check
if: ${{ env.server_ref != '' }}
run: cat version.php | grep 'OC_VersionString' | grep -i -v 'RC'
7 changes: 6 additions & 1 deletion .github/workflows/check-occ-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ on:
paths:
- '**.rst'

permissions:
contents: read

jobs:
check-occ-command:
name: Check occ command syntax
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.1
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false

- name: Run script
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
branches:
- master

permissions:
contents: read

jobs:
codespell:
name: Check spelling
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/generate_catalog_templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- 'user_manual/**'
- '!user_manual/locale/**'

permissions:
contents: read

jobs:
user_manual:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.2.2
with:
submodules: true
persist-credentials: false

- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
with:
php-version: '8.1'
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pr-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
schedule:
- cron: '30 1 * * *'

permissions:
contents: read
pull-requests: write

jobs:
pr-feedback:
if: ${{ github.repository_owner == 'nextcloud' }}
Expand All @@ -32,7 +36,7 @@ jobs:
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"

- uses: marcelklehr/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4
- uses: nextcloud/pr-feedback-action@f0cab224dea8e1f282f9451de322f323c78fc7a5 # main
with:
feedback-message: |
Hello there,
Expand All @@ -46,6 +50,6 @@ jobs:

(If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).)
days-before-feedback: 14
start-date: '2024-04-30'
start-date: '2025-06-12'
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
exempt-bots: true
11 changes: 11 additions & 0 deletions .github/workflows/sphinxbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ on:
- master
- stable*

permissions:
contents: read

jobs:
user_manual:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
with:
python-version: '3.12'
Expand All @@ -33,6 +38,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
with:
python-version: '3.12'
Expand All @@ -46,6 +53,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
with:
python-version: '3.12'
Expand All @@ -67,6 +76,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
with:
python-version: '3.12'
Expand Down
33 changes: 18 additions & 15 deletions .github/workflows/transifex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@ name: AutoMerge Transifex Pull Requests
on:
pull_request:

permissions:
contents: read

jobs:
approve:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'transifex-integration[bot]'
runs-on: ubuntu-latest-low
permissions:
# for hmarr/auto-approve-action to approve PRs
pull-requests: write
# for alexwilson/enable-github-automerge-action to approve PRs
contents: write

name: Approve
steps:
- uses: hmarr/auto-approve-action@v4.0.0
if: github.actor == 'transifex-integration[bot]'
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

automerge:
runs-on: ubuntu-latest
name: Auto-merge
needs: approve
steps:
- uses: pascalgn/automerge-action@v0.16.4
if: github.actor == 'transifex-integration[bot]'
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: ""
MERGE_RETRIES: 10
MERGE_RETRY_SLEEP: 120000
# Enable GitHub auto merge
- name: Auto merge
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
if: startsWith(steps.branchname.outputs.branch, 'translations_')
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Loading