-
-
Notifications
You must be signed in to change notification settings - Fork 13
62 lines (51 loc) · 1.57 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Release
on:
push:
tags:
- '*'
workflow_dispatch:
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
jobs:
verify-image:
runs-on: ubuntu-latest
steps:
- name: Verify Base Image Integrity
run:
gh attestation verify oci://ghcr.io/vanilla-os/pico:main --owner Vanilla-OS
env:
GH_TOKEN: ${{ github.token }}
release:
runs-on: ubuntu-latest
needs: verify-image
permissions:
contents: write # Allow actions to create release
attestations: write # To create and write attestations
id-token: write # Additional permissions for the persistence of the attestations
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Change tag in recipe.
if: ${{ github.ref_type == 'tag' }}
run: |
sed 's/ghcr.io\/vanilla-os\/pico:dev/ghcr.io\/vanilla-os\/pico:main/' -i recipe.yml
- uses: vanilla-os/[email protected]
with:
recipe: 'recipe.yml'
plugins: 'Vanilla-OS/vib-fsguard:v1.5.3'
- uses: actions/upload-artifact@v4
with:
name: Containerfile
path: Containerfile
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${{ github.ref_name }}" --generate-notes Containerfile
- name: Attest Release Files
id: attest
uses: actions/attest-build-provenance@v1
with:
subject-path: 'Containerfile'