Skip to content

Commit cc4d420

Browse files
committed
Update GHA workflows to match development branch
1 parent e5b8241 commit cc4d420

File tree

2 files changed

+47
-13
lines changed

2 files changed

+47
-13
lines changed

.github/workflows/pr.yaml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,27 @@ on:
2020
- development
2121
- 'integ_[0-9]+\.[0-9]+'
2222

23+
permissions:
24+
contents: read
25+
2326
jobs:
27+
fail-if-unsafe:
28+
runs-on: ubuntu-latest
29+
if: ${{ !contains( github.event.pull_request.labels.*.name, 'safe-to-test') }}
30+
steps:
31+
- name: Fail if not marked as safe to test
32+
run: |
33+
echo "CI will not run on a PR unless it has the safe-to-test label applied"
34+
exit 1
2435
test-go:
2536
name: Lint & test Go code
2637
runs-on: [ self-hosted, Linux ]
38+
if: ${{ contains( github.event.pull_request.labels.*.name, 'safe-to-test') }}
2739
container:
28-
image: golang:1.19
40+
image: golang:1.24-alpine
41+
credentials:
42+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
43+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
2944

3045
steps:
3146
- name: Dump github context
@@ -41,10 +56,13 @@ jobs:
4156
- name: Dump github ref
4257
run: echo "$GITHUB_REF"
4358

44-
- uses: actions/checkout@v3
59+
- uses: actions/checkout@v4
4560
with:
4661
ref: refs/pull/${{ github.event.number }}/merge
4762

63+
- name: Install Make
64+
run: apk add make
65+
4866
- name: Lint
4967
run: make lint
5068

@@ -58,8 +76,12 @@ jobs:
5876
test-py:
5977
name: Lint & test Python code
6078
runs-on: [ self-hosted, Linux ]
79+
if: ${{ contains( github.event.pull_request.labels.*.name, 'safe-to-test') }}
6180
container:
62-
image: python:3.9.18
81+
image: python:3.11.11
82+
credentials:
83+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
84+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
6385

6486
steps:
6587
- name: Dump github context
@@ -75,7 +97,7 @@ jobs:
7597
- name: Dump github ref
7698
run: echo "$GITHUB_REF"
7799

78-
- uses: actions/checkout@v3
100+
- uses: actions/checkout@v4
79101
with:
80102
ref: refs/pull/${{ github.event.number }}/merge
81103

@@ -87,7 +109,7 @@ jobs:
87109

88110
- uses: actions/setup-go@v3
89111
with:
90-
go-version: "^1.19.13"
112+
go-version: "^1.24.3"
91113

92114
- name: Run Python tests
93115
run: make test-py

.github/workflows/release.yaml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@ on:
1919
types:
2020
- created
2121

22+
permissions:
23+
contents: write
24+
2225
jobs:
2326
test-go:
2427
name: Lint & test Go code
2528
runs-on: [ self-hosted, Linux ]
2629
container:
27-
image: golang:1.19
30+
image: golang:1.24-alpine
31+
credentials:
32+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
33+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
2834

2935
steps:
3036
- name: Dump github context
@@ -40,7 +46,10 @@ jobs:
4046
- name: Dump github ref
4147
run: echo "$GITHUB_REF"
4248

43-
- uses: actions/checkout@v3
49+
- uses: actions/checkout@v4
50+
51+
- name: Install Make
52+
run: apk add make
4453

4554
# This gets killed, probably due to memory usage
4655
# - name: Lint
@@ -57,7 +66,10 @@ jobs:
5766
name: Lint & test Python code
5867
runs-on: [ self-hosted, Linux ]
5968
container:
60-
image: python:3.9.18
69+
image: python:3.11.11
70+
credentials:
71+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
72+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
6173

6274
env:
6375
V3IO_API: ${{ secrets.V3IO_API }}
@@ -78,7 +90,7 @@ jobs:
7890
- name: Dump github ref
7991
run: echo "$GITHUB_REF"
8092

81-
- uses: actions/checkout@v3
93+
- uses: actions/checkout@v4
8294

8395
- name: Install dependencies
8496
run: make python-deps
@@ -88,7 +100,7 @@ jobs:
88100

89101
- uses: actions/setup-go@v3
90102
with:
91-
go-version: "^1.19.13"
103+
go-version: "^1.24.3"
92104

93105
- name: Run Python tests
94106
run: make test-py
@@ -115,11 +127,11 @@ jobs:
115127
- name: Dump github ref
116128
run: echo "$GITHUB_REF"
117129

118-
- uses: actions/checkout@v3
130+
- uses: actions/checkout@v4
119131

120132
- uses: actions/setup-go@v3
121133
with:
122-
go-version: "^1.19.13"
134+
go-version: "^1.24.3"
123135

124136
- name: Build binaries for ${{ matrix.go-os }}
125137
run: make frames-bin
@@ -186,7 +198,7 @@ jobs:
186198
- release-docker-internal
187199

188200
steps:
189-
- uses: actions/checkout@v3
201+
- uses: actions/checkout@v4
190202

191203
- name: Set up python ${{ matrix.python-version }}
192204
uses: actions/setup-python@v4

0 commit comments

Comments
 (0)