Skip to content

Commit 231e7cb

Browse files
committed
Bump actions
1 parent b89e7d1 commit 231e7cb

File tree

2 files changed

+69
-17
lines changed

2 files changed

+69
-17
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [ master, simplesamlphp-* ]
6+
paths:
7+
- '**.md'
8+
pull_request:
9+
branches: [ master, simplesamlphp-* ]
10+
paths:
11+
- '**.md'
12+
13+
jobs:
14+
quality:
15+
name: Quality checks
16+
runs-on: [ubuntu-latest]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Lint markdown files
22+
uses: nosborn/[email protected]
23+
with:
24+
files: .
25+
ignore_path: .markdownlintignore
26+
27+
- name: Perform spell check
28+
uses: codespell-project/actions-codespell@master
29+
with:
30+
path: '**/*.md'
31+
check_filenames: true
32+
ignore_words_list: tekst
33+
34+
build:
35+
name: Build documentation
36+
needs: quality
37+
runs-on: [ubuntu-latest]
38+
39+
steps:
40+
- name: Run docs build
41+
if: github.event_name != 'pull_request'
42+
uses: actions/github-script@v6
43+
with:
44+
# Token has to be generated on a user account that controls the docs-repository.
45+
# The _only_ scope to select is "Access public repositories", nothing more.
46+
github-token: ${{ secrets.PAT_TOKEN }}
47+
script: |
48+
await github.rest.actions.createWorkflowDispatch({
49+
owner: 'simplesamlphp',
50+
repo: 'docs',
51+
workflow_id: 'mk_docs.yml',
52+
ref: 'main'
53+
})

.github/workflows/php.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ name: CI
33
on:
44
push:
55
branches: [ '**' ]
6+
paths-ignore:
7+
- '**.md'
68
pull_request:
79
branches: [ master, release-* ]
10+
paths-ignore:
11+
- '**.md'
812

913
jobs:
1014
basic-tests:
@@ -37,14 +41,14 @@ jobs:
3741
git config --global core.autocrlf false
3842
git config --global core.eol lf
3943
40-
- uses: actions/checkout@v2
44+
- uses: actions/checkout@v3
4145

4246
- name: Get composer cache directory
4347
id: composer-cache
4448
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
4549

4650
- name: Cache composer dependencies
47-
uses: actions/cache@v1
51+
uses: actions/cache@v3
4852
with:
4953
path: ${{ steps.composer-cache.outputs.dir }}
5054
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -91,14 +95,14 @@ jobs:
9195
- name: Setup problem matchers for PHP
9296
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
9397

94-
- uses: actions/checkout@v2
98+
- uses: actions/checkout@v3
9599

96100
- name: Get composer cache directory
97101
id: composer-cache
98102
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
99103

100104
- name: Cache composer dependencies
101-
uses: actions/cache@v1
105+
uses: actions/cache@v3
102106
with:
103107
path: ${{ steps.composer-cache.outputs.dir }}
104108
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -132,14 +136,14 @@ jobs:
132136
- name: Setup problem matchers for PHP
133137
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
134138

135-
- uses: actions/checkout@v2
139+
- uses: actions/checkout@v3
136140

137141
- name: Get composer cache directory
138142
id: composer-cache
139143
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
140144

141145
- name: Cache composer dependencies
142-
uses: actions/cache@v1
146+
uses: actions/cache@v3
143147
with:
144148
path: ${{ steps.composer-cache.outputs.dir }}
145149
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -161,6 +165,7 @@ jobs:
161165

162166
steps:
163167
- name: Setup PHP, with composer and extensions
168+
id: setup-php
164169
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
165170
with:
166171
php-version: '7.4'
@@ -170,14 +175,14 @@ jobs:
170175
- name: Setup problem matchers for PHP
171176
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
172177

173-
- uses: actions/checkout@v2
178+
- uses: actions/checkout@v3
174179

175180
- name: Get composer cache directory
176181
id: composer-cache
177182
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
178183

179184
- name: Cache composer dependencies
180-
uses: actions/cache@v1
185+
uses: actions/cache@v3
181186
with:
182187
path: ${{ steps.composer-cache.outputs.dir }}
183188
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -192,22 +197,16 @@ jobs:
192197
path: ${{ github.workspace }}/build
193198

194199
- name: Codecov
195-
uses: codecov/codecov-action@v1
200+
uses: codecov/codecov-action@v3
196201

197202
- name: PHP Code Sniffer
198203
continue-on-error: true
199204
run: php vendor/bin/phpcs
200205

201206
- name: Psalm
202207
continue-on-error: true
203-
run: php vendor/bin/psalm --show-info=true --shepherd
208+
run: php vendor/bin/psalm --show-info=true --shepherd --php-version=${{ steps.setup-php.outputs.php-version }}
204209

205210
- name: Psalter
206211
continue-on-error: true
207-
run: php vendor/bin/psalter --issues=UnnecessaryVarAnnotation --dry-run
208-
209-
- name: Lint markdown files
210-
uses: nosborn/[email protected]
211-
with:
212-
files: .
213-
ignore_path: .markdownlintignore
212+
run: php vendor/bin/psalter --issues=UnnecessaryVarAnnotation --dry-run --php-version=${{ steps.setup-php.outputs.php-version }}

0 commit comments

Comments
 (0)