forked from eraser-dev/eraser
-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (29 loc) · 978 Bytes
/
build-id.yaml
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
name: Image build definitions for e2e tests
on:
workflow_call:
outputs:
build-id:
description: "random build id to keep things together"
value: ${{ jobs.generate-build-id.outputs.image-build-id }}
bucket-id:
description: "docker-images-<build-id>"
value: ${{ jobs.generate-build-id.outputs.bucket-id }}
permissions:
contents: read
jobs:
generate-build-id:
name: "Generate Build ID"
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- id: build-id
run: |
build_id="$(date +%s)"
echo build-id=$build_id | tee -a $GITHUB_OUTPUT
echo bucket-id=docker-images-$build_id | tee -a $GITHUB_OUTPUT
outputs:
image-build-id: ${{ steps.build-id.outputs.build-id }}
bucket-id: ${{ steps.build-id.outputs.bucket-id }}