forked from confidential-containers/cloud-api-adaptor
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (72 loc) · 2.25 KB
/
publish_images_on_push.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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# (C) Copyright Confidential Containers Contributors 2023.
# SPDX-License-Identifier: Apache-2.0
#
# Build and push project images on pull requests merged.
---
name: Publish project images
on:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
get_changed_files:
runs-on: ubuntu-latest
outputs:
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
caa:
uses: ./.github/workflows/caa_build_and_push_per_arch.yaml
with:
registry: ghcr.io/${{ github.repository_owner }}
secrets: inherit
csi-wrapper:
needs: [get_changed_files]
uses: ./.github/workflows/csi_wrapper_images.yaml
if: >
github.event_name == 'push' &&
contains(needs.get_changed_files.outputs.changed_files, 'volumes/csi-wrapper/')
with:
registry: ghcr.io/${{ github.repository_owner }}
image_tags: latest,${{ github.sha }}
git_ref: ${{ github.sha }}
secrets: inherit
peerpod-ctrl:
needs: [get_changed_files]
uses: ./.github/workflows/peerpod-ctrl_image.yaml
if: >
github.event_name == 'push' &&
contains(needs.get_changed_files.outputs.changed_files, 'peerpod-ctrl/')
with:
registry: ghcr.io/${{ github.repository_owner }}
image_tags: latest,${{ github.sha }}
git_ref: ${{ github.sha }}
secrets: inherit
peerpodconfig-ctrl:
needs: [get_changed_files]
uses: ./.github/workflows/peerpodconfig-ctrl_image.yaml
if: >
github.event_name == 'push' &&
contains(needs.get_changed_files.outputs.changed_files, 'peerpodconfig-ctrl/')
with:
registry: ghcr.io/${{ github.repository_owner }}
image_tags: ${{ github.sha }},latest
git_ref: ${{ github.sha }}
secrets: inherit
webhook:
needs: [get_changed_files]
uses: ./.github/workflows/webhook_image.yaml
if: >
github.event_name == 'push' &&
contains(needs.get_changed_files.outputs.changed_files, 'webhook/')
with:
registry: ghcr.io/${{ github.repository_owner }}
image_tags: ${{ github.sha }},latest
git_ref: ${{ github.sha }}
secrets: inherit