37
37
description : ' User email in GIT to perform git pull/push'
38
38
required : false
39
39
40
- BUMP_MANIFEST :
41
- type : boolean
42
- description : " Flag to bump manifest file or not "
43
- default : false
44
- required : false
40
+ MANIFEST_ARTIFACT_NAME :
41
+ type : string
42
+ description : Artifact name in current run w/ manifest/patches. Leaving empty uses manifest/patches in current branch
43
+ default : ' '
44
+ required : false
45
45
outputs :
46
46
DOCKER_TAG :
47
47
description : " Tag of the image built"
@@ -57,40 +57,7 @@ permissions:
57
57
58
58
jobs :
59
59
60
- bump-manifest :
61
- runs-on : ubuntu-22.04
62
- steps :
63
- - name : Check out the repository under ${GITHUB_WORKSPACE}
64
- uses : actions/checkout@v4
65
-
66
- - name : Test if manifest bump is functional, and save result to a new file
67
- working-directory : .github/container
68
- shell : bash -x -e {0}
69
- run : |
70
- bash bump.sh --input-manifest manifest.yaml --output-manifest manifest.yaml.new
71
-
72
- - name : Replace current manifest with the new one and show diff
73
- if : inputs.BUMP_MANIFEST
74
- working-directory : .github/container
75
- shell : bash -x -e {0}
76
- run : |
77
- mv manifest.yaml.new manifest.yaml
78
- git diff
79
-
80
- - name : Upload bumped manifest to be used in build-base
81
- uses : actions/upload-artifact@v4
82
- with :
83
- name : maybe-bumped-manifest-${{ inputs.ARCHITECTURE }}
84
- path : .github/container/manifest.yaml
85
-
86
- - name : Upload patch folder to be used in build-base
87
- uses : actions/upload-artifact@v4
88
- with :
89
- name : maybe-bumped-patches-${{ inputs.ARCHITECTURE }}
90
- path : .github/container/patches
91
-
92
60
build-base :
93
- needs : bump-manifest
94
61
runs-on : [self-hosted, "${{ inputs.ARCHITECTURE }}", small]
95
62
env :
96
63
BADGE_FILENAME_FULL : ${{ inputs.BADGE_FILENAME }}-${{ inputs.ARCHITECTURE }}.json
@@ -102,26 +69,19 @@ jobs:
102
69
103
70
- name : Check out the repository under ${GITHUB_WORKSPACE}
104
71
uses : actions/checkout@v4
105
-
72
+
106
73
- name : Delete checked-out manifest and patches
107
- if : inputs.BUMP_MANIFEST
74
+ if : inputs.MANIFEST_ARTIFACT_NAME != ''
108
75
run : |
109
76
rm .github/container/manifest.yaml
110
77
rm -rf .github/container/patches
111
78
112
- - name : Replace checked-out manifest file with bumped one
113
- if : inputs.BUMP_MANIFEST
79
+ - name : Replace checked-out manifest file/patches with bumped one
80
+ if : inputs.MANIFEST_ARTIFACT_NAME != ''
114
81
uses : actions/download-artifact@v4
115
82
with :
116
- name : maybe-bumped-manifest- ${{ inputs.ARCHITECTURE }}
83
+ name : ${{ inputs.MANIFEST_ARTIFACT_NAME }}
117
84
path : .github/container/
118
-
119
- - name : Replace checked-out patch folder with bumped one
120
- if : inputs.BUMP_MANIFEST
121
- uses : actions/download-artifact@v4
122
- with :
123
- name : maybe-bumped-patches-${{ inputs.ARCHITECTURE }}
124
- path : .github/container/patches
125
85
126
86
- name : Log the changes in manifest file and patch folder
127
87
working-directory : .github/container
0 commit comments