Skip to content

Commit d7a5d7a

Browse files
committed
feat(ci): enhance CI pipeline with README artifact management
- Removes unnecessary checkout step from the pipeline. - Adds steps to upload and download the README artifact. - Configures synchronization of the README on Docker Hub after download. - Ensures compatibility with 'linux/amd64' platform for artifact uploading.
1 parent 5638179 commit d7a5d7a

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

.github/workflows/pipeline.yaml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ jobs:
130130
gitVersion_SemVer: ${{ needs.discovery.outputs.gitVersion_SemVer }}
131131
gitVersion_AssemblySemFileVer: ${{ needs.discovery.outputs.gitVersion_AssemblySemFileVer }}
132132
steps:
133-
- name: checkout
134-
uses: actions/checkout@v4
135-
136133
- name: tools - docker - login ghcr.io
137134
if: ${{ env.build_push == 'true' }}
138135
uses: docker/login-action@v3
@@ -172,6 +169,14 @@ jobs:
172169
${{ env.container_image_repository_dockerhub }}/${{ env.container_image }}:${{ env.gitVersion_SemVer }}-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}
173170
${{ env.container_image_repository_ghcr }}/${{ env.container_image }}:${{ env.gitVersion_SemVer }}-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}
174171
172+
- name: artifacts - upload readme
173+
if: ${{ matrix.platform == 'linux/amd64' }}
174+
uses: actions/upload-artifact@v4
175+
with:
176+
name: readme
177+
path: README.md
178+
retention-days: 1
179+
175180
manifest:
176181
name: build - manifest
177182
if: ${{ needs.discovery.outputs.build_push == 'true' }}
@@ -214,6 +219,8 @@ jobs:
214219
gitVersion_SemVer: ${{ needs.discovery.outputs.gitVersion_SemVer }}
215220
gitVersion_AssemblySemFileVer: ${{ needs.discovery.outputs.gitVersion_AssemblySemFileVer }}
216221
steps:
222+
- name: checkout
223+
uses: actions/checkout@v4
217224
- name: tools - docker - login ghcr.io
218225
uses: docker/login-action@v3
219226
with:
@@ -248,6 +255,21 @@ jobs:
248255
generate_release_notes: true
249256
token: ${{ secrets.ES_GITHUB_PAT }}
250257

258+
- name: artifacts - download readme
259+
uses: actions/download-artifact@v4
260+
with:
261+
name: readme
262+
path: .
263+
264+
- name: dockerhub - readme - sync
265+
uses: peter-evans/dockerhub-description@v4
266+
with:
267+
username: ${{ secrets.ES_DOCKERHUB_USERNAME }}
268+
password: ${{ secrets.ES_DOCKERHUB_PAT }}
269+
repository: ${{ env.container_image_repository_dockerhub }}/${{ env.container_image }}
270+
readme-filepath: ./README.md
271+
short-description: "Enhanced GitHub Actions self-hosted runner with comprehensive development tools"
272+
251273

252274

253275

0 commit comments

Comments
 (0)