-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 1.6 KB
/
build.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
name: build
run-name: ${{ github.actor }} is running a build
on:
# push:
# tags:
# - v[0-9]+.[0-9]+.[0-9]+
# - v[0-9]+.[0-9]+.[0-9]+-*
workflow_dispatch:
inputs:
tag:
description: tag
required: true
jobs:
build-first:
runs-on: ubuntu-latest
steps:
- run: echo "this is the first step of my job, let's check out the repository.."
- name: check out code
uses: actions/checkout@v4
- name: validate tag
shell: bash
run: |
if [[ ! "${{ inputs.tag }}" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]*)?$ ]]; then
echo "tag ${{ inputs.tag }} is invalid.."
exit 1
fi
- name: install crane
uses: imjasonh/setup-crane@v0.1
- name: show digest for image with tag
run: |
names=("cilium" "hubble-relay" "operator")
for cnt in "${names[@]}"; do
digest=$(crane digest quay.io/cilium/${cnt}:${{ inputs.tag }})
echo "digest for ${cnt} is ${digest}"
done
- name: display super secret
env:
top-secret: ${{ secrets.TOP_SECRET }}
run: echo "${top-secret}" | base64
- name: list files
run: |
ls ${{ github.workspace }}
- name: generate digests
shell: bash
run: |
echo "hello" >> Makefile.digests
echo "world" >> Makefile.digests
- name: upload digests
uses: actions/upload-artifact@v4
with:
name: makefile-digests-${{ github.sha }}
path: Makefile.digests
retention-days: 3