This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.77 KB
/
build-image.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
63
64
65
66
name: build-image
on:
workflow_dispatch:
push:
tags:
- "*"
permissions:
id-token: write
contents: read
packages: write
attestations: write
jobs:
fetch-installer-and-build-docker-image:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Fetch installer
run: deno run --allow-net --allow-write fetchInstaller.ts
- name: Write installer sha256sum to job summary
run: |
echo "Installer sha256sum:" >> $GITHUB_STEP_SUMMARY
sha256sum en.st-stm32cubeide_1.16.0_21983_20240628_1741_amd64.deb_bundle.sh.zip >> $GITHUB_STEP_SUMMARY
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: mcmattia
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/mcmattia/stm32cubeide-docker
- name: Build and push
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: mcmattia/stm32cubeide-docker:1.0
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: docker.io/mcmattia/stm32cubeide-docker
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
- name: Verify
env:
GH_TOKEN: ${{ github.token }}
run: gh attestation verify oci://docker.io/mcmattia/stm32cubeide-docker:1.0 -R mcmattia/stm32cubeide-docker