Skip to content

Commit 119782d

Browse files
committed
feat(ci): provide SLSA 3 builds
1 parent 5589f79 commit 119782d

27 files changed

+1450
-370
lines changed

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
build/
2+
dist/
3+
.git/
4+
metadata/
5+
private.key
6+
private-key.pem
7+
wireguard.key
8+
protonwire.key
9+
protonvpn.key

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ insert_final_newline = false
3434

3535
[Vagrantfile]
3636
indent_size = 2
37+
38+
[metadata/**/*]
39+
insert_final_newline = false
40+
trim_trailing_whitespace = false

.github/ISSUE_TEMPLATE/bugreport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ body:
2727
required: true
2828
- label: I have verified that my generated Wireguard private keys are valid and have required features (Netshield Ad-blocker, VPN accelerator etc) are enabled.
2929
required: true
30-
- label: I am using a valid server name (either fully qualified DNS name like `nl-free-127.protonvpn.net` or server name like `NL#1`) as mentioned in the docs.
30+
- label: I am using a valid server name (either fully qualified DNS name like `nl-free-127.protonvpn.net` or server IP) as mentioned in the docs.
3131
required: true
3232

3333
- type: input

.github/dependabot.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,33 @@ updates:
1414
pull-request-branch-name:
1515
separator: "-"
1616

17-
- package-ecosystem: docker
17+
- package-ecosystem: github-actions
1818
labels:
1919
- "dependabot"
20-
- "dep/docker"
20+
- "dep/github-actions"
2121
- "luna/autoupdate"
22-
target-branch: release/7.2
2322
commit-message:
24-
prefix: "chore(deps):"
23+
prefix: "ci(deps):"
2524
directory: "/"
2625
schedule:
2726
interval: "weekly"
2827
day: "saturday"
2928
pull-request-branch-name:
3029
separator: "-"
3130

32-
- package-ecosystem: github-actions
31+
# For go, Only builders use the deps it is note a runtime
32+
# dependency, so only apply security updates.
33+
- package-ecosystem: gomod
34+
directory: /
3335
labels:
34-
- "dependabot"
35-
- "dep/github-actions"
36-
- "luna/autoupdate"
37-
commit-message:
38-
prefix: "ci(deps):"
39-
directory: "/"
36+
- "bot/dependabot"
37+
- "deps/go"
4038
schedule:
4139
interval: "weekly"
4240
day: "saturday"
41+
commit-message:
42+
prefix: "deps(go):"
4343
pull-request-branch-name:
4444
separator: "-"
45+
# Disable version updates and only apply security updates.
46+
open-pull-requests-limit: 0

.github/workflows/build.yml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,66 @@
11
name: build
22
on:
33
push:
4+
branches:
5+
- "**"
6+
tags-ignore:
7+
- "**"
48
pull_request:
59
workflow_dispatch:
10+
11+
permissions: {}
12+
613
jobs:
7-
shellcheck:
14+
lint:
815
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
918
steps:
1019
- uses: actions/checkout@v4
20+
21+
- name: Setup Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version: stable
25+
26+
- name: Install Task
27+
run: go install github.com/go-task/task/v3/cmd/task@latest
28+
1129
- name: Shellcheck
12-
run: make shellcheck
30+
run: task --verbose shellcheck
31+
32+
- name: Update README
33+
run: task --verbose update-readme
34+
35+
- name: Check if README is up-to date
36+
run: git diff --exit-code README.md
37+
1338
build:
1439
runs-on: ubuntu-latest
40+
permissions:
41+
contents: read
1542
steps:
1643
- uses: actions/checkout@v4
1744
with:
1845
fetch-depth: 0
1946
persist-credentials: false
47+
2048
- name: Set up QEMU
2149
uses: docker/setup-qemu-action@v3
2250

2351
- name: Set up Docker Buildx
2452
uses: docker/setup-buildx-action@v3
2553

26-
- name: Install GoReleaser
27-
uses: goreleaser/goreleaser-action@v5
54+
- name: Setup Go
55+
uses: actions/setup-go@v5
2856
with:
29-
version: latest
30-
install-only: true
57+
go-version: stable
58+
59+
- name: Install Task
60+
run: go install github.com/go-task/task/v3/cmd/task@latest
3161

32-
- name: Install help2man
33-
run: sudo apt-get install -y help2man
62+
- name: Install crane
63+
run: go install github.com/google/go-containerregistry/cmd/crane@latest
3464

35-
- name: Run GoReleaser
36-
run: make snapshot
65+
- name: Build Images
66+
run: task --verbose build-images

.github/workflows/docs.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/metadata-gh-pages.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/metadata.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@ on:
1111
- "yes"
1212
- "no"
1313
push:
14-
branches:
15-
- "**"
14+
branches-ignore:
15+
- "slsa-verify*"
16+
- "dependabot*"
17+
- "dependabot/**"
1618
tags-ignore:
1719
- "**"
1820
schedule:
1921
- cron: "30 * * * *"
2022
jobs:
2123
metadata:
2224
runs-on: ubuntu-latest
23-
# exclude dependabot from running this workflow.
24-
if: ${{ github.actor != 'dependabot[bot]' }}
25+
permissions:
26+
id-token: write
2527
steps:
2628
- name: Checkout project repo
2729
uses: actions/checkout@v4
@@ -47,21 +49,21 @@ jobs:
4749
uses: actions/create-github-app-token@v1
4850
id: bot-token
4951
with:
50-
app-id: ${{ vars.METADATA_BOT_APP_ID }}
51-
repositories: ${{ vars.METADATA_REPO_NAME }}
5252
owner: ${{ vars.METADATA_REPO_OWNER }}
53+
app-id: ${{ vars.METADATA_BOT_APP_ID }}
5354
private-key: ${{ secrets.METADATA_BOT_APP_PRIVATE_KEY }}
55+
repositories: ${{ vars.METADATA_REPO_NAME }}
5456

55-
- name: Checkout metadata repo to protonwire-api-deploy
57+
- name: Checkout metadata repo to protonwire-api
5658
uses: actions/checkout@v4
5759
with:
58-
repository: ${{ vars.METADATA_REPO }}
59-
path: protonwire-api-deploy
60+
path: protonwire-api
6061
token: ${{ steps.bot-token.outputs.token }}
62+
repository: ${{ vars.METADATA_REPO }}
6163
persist-credentials: true
6264

6365
- name: Configure git and remove stale data
64-
working-directory: protonwire-api-deploy
66+
working-directory: protonwire-api
6567
run: |
6668
git config user.name ${{ vars.METADATA_BOT_GIT_USERNAME }}
6769
git config user.email ${{ vars.METADATA_BOT_GIT_EMAIL }}
@@ -73,10 +75,10 @@ jobs:
7375
--archive \
7476
--human-readable \
7577
./metadata/ \
76-
${GITHUB_WORKSPACE}/protonwire-api-deploy/
78+
${GITHUB_WORKSPACE}/protonwire-api/
7779
7880
- name: Push Metadata (if on master)
79-
working-directory: protonwire-api-deploy
81+
working-directory: protonwire-api
8082
if: github.ref == 'refs/heads/master'
8183
run: |
8284
git add --all

0 commit comments

Comments
 (0)