forked from keylime/keylime
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.77 KB
/
update-base-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
name: Create PR updating containers base image
on:
workflow_dispatch:
branches:
- master
schedule:
- cron: "0 0 1 * *"
env:
FEDORA_IMAGE: quay.io/fedora/fedora
TAG: latest
IMAGE_BASE: quay.io/keylime
jobs:
update-base-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install skopeo and jq
run: sudo apt-get install -y skopeo jq
- name: Get hash of the latest stable version of Fedora
run: echo "FEDORA_HASH=$(skopeo inspect docker://${{ env.FEDORA_IMAGE }}:${{ env.TAG }} | jq '.Digest')" >> "$GITHUB_ENV"
- name: Update the Dockerfile template and CI Dockerfile
run: |
sed -i "s#\(FROM \)[^ ]*#\1${{ env.FEDORA_IMAGE }}@${{ env.FEDORA_HASH }}#" docker/release/base/Dockerfile.in
sed -i "s#\(FROM \).*#\1${{ env.FEDORA_IMAGE }}@${{ env.FEDORA_HASH }}#" docker/ci/Dockerfile
- name: Get current date for message
id: date
run: echo "DATE=$(date +"%Y-%m-%d")" >> "$GITHUB_ENV"
- name: Create pull request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
with:
add-paths: |
docker/release/base/Dockerfile.in
docker/ci/Dockerfile
title: "[Automatic] Update Keylime base image (${{ env.DATE }})"
signoff: true
body: |
Automatically update the Keylime base image using:
Base image: ${{ env.FEDORA_IMAGE }}@${{ env.FEDORA_HASH }}
commit-message: |
[Automatic] Update Keylime base image ${{ env.DATE }}
Automatically update the Keylime base image using:
Base image: ${{ env.FEDORA_IMAGE }}@${{ env.FEDORA_HASH }}