Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Commit be0c27e

Browse files
authored
Update all the CI actions (#3323)
Also adds a job for the scheduled CI run to only run if there has been a commit in the last 24h ([StackOverflow](https://stackoverflow.com/questions/63014786/how-to-schedule-a-github-actions-nightly-build-but-run-it-only-when-there-where)) [skip ci]
1 parent 436773a commit be0c27e

File tree

6 files changed

+101
-62
lines changed

6 files changed

+101
-62
lines changed

.github/workflows/dendrite.yml

Lines changed: 44 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
runs-on: ubuntu-latest
2929
if: ${{ false }} # disable for now
3030
steps:
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232

3333
- name: Install Go
34-
uses: actions/setup-go@v3
34+
uses: actions/setup-go@v4
3535
with:
3636
go-version: "stable"
3737
cache: true
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
node-version: 14
4343

44-
- uses: actions/cache@v3
44+
- uses: actions/cache@v4
4545
with:
4646
path: ~/.npm
4747
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -66,11 +66,11 @@ jobs:
6666
name: Linting
6767
runs-on: ubuntu-latest
6868
steps:
69-
- uses: actions/checkout@v3
69+
- uses: actions/checkout@v4
7070
- name: Install libolm
7171
run: sudo apt-get install libolm-dev libolm3
7272
- name: Install Go
73-
uses: actions/setup-go@v3
73+
uses: actions/setup-go@v4
7474
with:
7575
go-version: "stable"
7676
- name: golangci-lint
@@ -102,14 +102,14 @@ jobs:
102102
--health-timeout 5s
103103
--health-retries 5
104104
steps:
105-
- uses: actions/checkout@v3
105+
- uses: actions/checkout@v4
106106
- name: Install libolm
107107
run: sudo apt-get install libolm-dev libolm3
108108
- name: Setup go
109-
uses: actions/setup-go@v3
109+
uses: actions/setup-go@v4
110110
with:
111111
go-version: "stable"
112-
- uses: actions/cache@v3
112+
- uses: actions/cache@v4
113113
# manually set up caches, as they otherwise clash with different steps using setup-go with cache=true
114114
with:
115115
path: |
@@ -141,12 +141,12 @@ jobs:
141141
goos: ["linux"]
142142
goarch: ["amd64", "386"]
143143
steps:
144-
- uses: actions/checkout@v3
144+
- uses: actions/checkout@v4
145145
- name: Setup go
146-
uses: actions/setup-go@v3
146+
uses: actions/setup-go@v4
147147
with:
148148
go-version: "stable"
149-
- uses: actions/cache@v3
149+
- uses: actions/cache@v4
150150
with:
151151
path: |
152152
~/.cache/go-build
@@ -174,12 +174,12 @@ jobs:
174174
goos: ["windows"]
175175
goarch: ["amd64"]
176176
steps:
177-
- uses: actions/checkout@v3
177+
- uses: actions/checkout@v4
178178
- name: Setup Go
179-
uses: actions/setup-go@v3
179+
uses: actions/setup-go@v4
180180
with:
181181
go-version: "stable"
182-
- uses: actions/cache@v3
182+
- uses: actions/cache@v4
183183
with:
184184
path: |
185185
~/.cache/go-build
@@ -235,19 +235,19 @@ jobs:
235235
--health-timeout 5s
236236
--health-retries 5
237237
steps:
238-
- uses: actions/checkout@v3
238+
- uses: actions/checkout@v4
239239
- name: Install libolm
240240
run: sudo apt-get install libolm-dev libolm3
241241
- name: Setup go
242-
uses: actions/setup-go@v3
242+
uses: actions/setup-go@v4
243243
with:
244244
go-version: "stable"
245245
- name: Set up gotestfmt
246246
uses: gotesttools/gotestfmt-action@v2
247247
with:
248248
# Optional: pass GITHUB_TOKEN to avoid rate limiting.
249249
token: ${{ secrets.GITHUB_TOKEN }}
250-
- uses: actions/cache@v3
250+
- uses: actions/cache@v4
251251
with:
252252
path: |
253253
~/.cache/go-build
@@ -262,10 +262,11 @@ jobs:
262262
POSTGRES_PASSWORD: postgres
263263
POSTGRES_DB: dendrite
264264
- name: Upload coverage to Codecov
265-
uses: codecov/codecov-action@v3
265+
uses: codecov/codecov-action@v4
266266
with:
267267
flags: unittests
268268
fail_ci_if_error: true
269+
token: ${{ secrets.CODECOV_TOKEN }}
269270

270271
# run database upgrade tests
271272
upgrade_test:
@@ -274,12 +275,20 @@ jobs:
274275
needs: initial-tests-done
275276
runs-on: ubuntu-latest
276277
steps:
277-
- uses: actions/checkout@v3
278+
- uses: actions/checkout@v4
278279
- name: Setup go
279-
uses: actions/setup-go@v3
280+
uses: actions/setup-go@v4
280281
with:
281282
go-version: "stable"
282283
cache: true
284+
- uses: actions/cache@v4
285+
with:
286+
path: |
287+
~/.cache/go-build
288+
~/go/pkg/mod
289+
key: ${{ runner.os }}-go-upgrade-test-${{ hashFiles('**/go.sum') }}
290+
restore-keys: |
291+
${{ runner.os }}-go-upgrade-test-
283292
- name: Docker version
284293
run: docker version
285294
- name: Build upgrade-tests
@@ -296,12 +305,20 @@ jobs:
296305
needs: initial-tests-done
297306
runs-on: ubuntu-latest
298307
steps:
299-
- uses: actions/checkout@v3
308+
- uses: actions/checkout@v4
300309
- name: Setup go
301-
uses: actions/setup-go@v3
310+
uses: actions/setup-go@v4
302311
with:
303312
go-version: "stable"
304313
cache: true
314+
- uses: actions/cache@v4
315+
with:
316+
path: |
317+
~/.cache/go-build
318+
~/go/pkg/mod
319+
key: ${{ runner.os }}-go-upgrade-direct-test-${{ hashFiles('**/go.sum') }}
320+
restore-keys: |
321+
${{ runner.os }}-go-upgrade-direct-test-
305322
- name: Docker version
306323
run: docker version
307324
- name: Build upgrade-tests
@@ -340,8 +357,8 @@ jobs:
340357
SYTEST_BRANCH: ${{ github.head_ref }}
341358
CGO_ENABLED: ${{ matrix.cgo && 1 }}
342359
steps:
343-
- uses: actions/checkout@v3
344-
- uses: actions/cache@v3
360+
- uses: actions/checkout@v4
361+
- uses: actions/cache@v4
345362
with:
346363
path: |
347364
~/.cache/go-build
@@ -364,7 +381,7 @@ jobs:
364381
run: /src/are-we-synapse-yet.py /logs/results.tap -v
365382
continue-on-error: true # not fatal
366383
- name: Upload Sytest logs
367-
uses: actions/upload-artifact@v2
384+
uses: actions/upload-artifact@v4
368385
if: ${{ always() }}
369386
with:
370387
name: Sytest Logs - ${{ job.status }} - (Dendrite, ${{ join(matrix.*, ', ') }})
@@ -404,8 +421,8 @@ jobs:
404421
run: |
405422
sudo apt-get update && sudo apt-get install -y libolm3 libolm-dev
406423
go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
407-
- name: Run actions/checkout@v3 for dendrite
408-
uses: actions/checkout@v3
424+
- name: Run actions/checkout@v4 for dendrite
425+
uses: actions/checkout@v4
409426
with:
410427
path: dendrite
411428

.github/workflows/docker.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ jobs:
2727
security-events: write # To upload Trivy sarif files
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131
- name: Get release tag & build flags
3232
if: github.event_name == 'release' # Only for GitHub releases
3333
run: |
3434
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
3535
- name: Set up QEMU
36-
uses: docker/setup-qemu-action@v1
36+
uses: docker/setup-qemu-action@v3
3737
- name: Set up Docker Buildx
38-
uses: docker/setup-buildx-action@v2
38+
uses: docker/setup-buildx-action@v3
3939
- name: Login to Docker Hub
40-
uses: docker/login-action@v2
40+
uses: docker/login-action@v3
4141
with:
4242
username: ${{ env.DOCKER_HUB_USER }}
4343
password: ${{ secrets.DOCKER_TOKEN }}
4444
- name: Login to GitHub Containers
45-
uses: docker/login-action@v2
45+
uses: docker/login-action@v3
4646
with:
4747
registry: ghcr.io
4848
username: ${{ github.repository_owner }}
@@ -98,22 +98,22 @@ jobs:
9898
packages: write
9999
steps:
100100
- name: Checkout
101-
uses: actions/checkout@v3
101+
uses: actions/checkout@v4
102102
- name: Get release tag & build flags
103103
if: github.event_name == 'release' # Only for GitHub releases
104104
run: |
105105
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
106106
- name: Set up QEMU
107-
uses: docker/setup-qemu-action@v1
107+
uses: docker/setup-qemu-action@v3
108108
- name: Set up Docker Buildx
109-
uses: docker/setup-buildx-action@v2
109+
uses: docker/setup-buildx-action@v3
110110
- name: Login to Docker Hub
111-
uses: docker/login-action@v2
111+
uses: docker/login-action@v3
112112
with:
113113
username: ${{ env.DOCKER_HUB_USER }}
114114
password: ${{ secrets.DOCKER_TOKEN }}
115115
- name: Login to GitHub Containers
116-
uses: docker/login-action@v2
116+
uses: docker/login-action@v3
117117
with:
118118
registry: ghcr.io
119119
username: ${{ github.repository_owner }}
@@ -159,22 +159,22 @@ jobs:
159159
packages: write
160160
steps:
161161
- name: Checkout
162-
uses: actions/checkout@v3
162+
uses: actions/checkout@v4
163163
- name: Get release tag & build flags
164164
if: github.event_name == 'release' # Only for GitHub releases
165165
run: |
166166
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
167167
- name: Set up QEMU
168-
uses: docker/setup-qemu-action@v1
168+
uses: docker/setup-qemu-action@v3
169169
- name: Set up Docker Buildx
170-
uses: docker/setup-buildx-action@v2
170+
uses: docker/setup-buildx-action@v3
171171
- name: Login to Docker Hub
172-
uses: docker/login-action@v2
172+
uses: docker/login-action@v3
173173
with:
174174
username: ${{ env.DOCKER_HUB_USER }}
175175
password: ${{ secrets.DOCKER_TOKEN }}
176176
- name: Login to GitHub Containers
177-
uses: docker/login-action@v2
177+
uses: docker/login-action@v3
178178
with:
179179
registry: ghcr.io
180180
username: ${{ github.repository_owner }}

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3232
- name: Setup Pages
3333
uses: actions/configure-pages@v2
3434
- name: Build with Jekyll

.github/workflows/helm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323

.github/workflows/k8s.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
outputs:
1818
changed: ${{ steps.list-changed.outputs.changed }}
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323
- uses: azure/setup-helm@v3
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: ubuntu-latest
4949
steps:
5050
- name: Checkout
51-
uses: actions/checkout@v3
51+
uses: actions/checkout@v4
5252
with:
5353
fetch-depth: 0
5454
ref: ${{ inputs.checkoutCommit }}

0 commit comments

Comments
 (0)