-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.39 KB
/
build_and_publish_changed_images.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
name: Build & publish changed images
on:
push:
branches:
- dev
- master
paths:
- "images/**/**"
workflow_dispatch:
jobs:
# Note: When modifying this job, copy modifications to all other workflows' image jobs.
changed_images:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: xpra
source_directory: .
submodules: recursive
source_files_for_diff: .
name: ${{ matrix.name }}${{ matrix.version_suffix }} image build & publish
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2 # This is for changed-files.
submodules: ${{ matrix.submodules }}
- name: Check for changes to ${{ matrix.name }} image source
id: check
uses: tj-actions/[email protected]
with:
files: ${{ matrix.source_files_for_diff }}
- name: Build & publish ${{ matrix.name }} image
if: steps.check.outputs.any_changed == 'true' || steps.check.outputs.any_deleted == 'true'
uses: ./.github/actions/build_and_publish_image
with:
github_personal_access_token: ${{ secrets.GITHUB_TOKEN }}
github_username: ${{ github.actor }}
image_name: ${{ matrix.name }}
image_source_directory: ${{ matrix.source_directory }}
image_version_1: ${{ github.ref_name }}${{ matrix.version_suffix }}