-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
34 lines (27 loc) · 978 Bytes
/
action.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
34
# yamllint disable rule:line-length
---
name: set org.opencontainer creation date and version labels
description: set org.opencontainer creation date and version labels
inputs:
working-directory:
description: set working directory. Default is ./.
required: false
default: "."
path:
description: path to the directory containing your Dockerfile and build context
required: false
default: .
dockerfile:
description: name of dockerfile
required: false
default: "Dockerfile"
runs:
using: "composite"
steps:
- name: set org.opencontainer creation date and version labels
working-directory: ${{ inputs.working-directory }}
shell: bash
run: |
sed -i "s/CREATED/$(date -u +"%Y-%m-%dT%H:%M:%SZ")/g" ${{ inputs.path}}/${{ inputs.dockerfile }}
sed -i "s/VERSION/${GITHUB_SHA}/g" ${{ inputs.path}}/${{ inputs.dockerfile }}
cat ${{ inputs.path}}/${{ inputs.dockerfile }} | grep ${GITHUB_SHA}