|
50 | 50 | name: docker (build and push) |
51 | 51 | runs-on: ubuntu-latest |
52 | 52 | needs: [go] |
53 | | - # if: github.event_name != 'pull_request' |
54 | 53 |
|
55 | 54 | permissions: |
56 | 55 | contents: read |
@@ -82,10 +81,10 @@ jobs: |
82 | 81 | images: ghcr.io/${{ github.repository }} |
83 | 82 | tags: | |
84 | 83 | type=raw,value=latest,enable={{is_default_branch}} |
85 | | - type=sha,format=short,prefix=0.1.0- |
| 84 | + type=sha,format=short,prefix=0.1.0-c |
86 | 85 | type=ref,event=tag |
87 | 86 |
|
88 | | - - name: Build and push |
| 87 | + - name: Build and push docker image |
89 | 88 | uses: docker/build-push-action@v6 |
90 | 89 | with: |
91 | 90 | context: . |
@@ -159,13 +158,23 @@ jobs: |
159 | 158 | mkdir -p dist |
160 | 159 | helm package helm \ |
161 | 160 | --destination dist \ |
162 | | - --version "${{ steps.ver.outputs.version }}" \ |
163 | | - --app-version "${{ steps.ver.outputs.version }}" |
| 161 | + --version "${{ steps.ver.outputs.docker_image_tag }}" \ |
| 162 | + --app-version "${{ steps.ver.outputs.docker_image_tag }}" |
164 | 163 |
|
165 | 164 | - name: Push chart to GHCR (OCI) |
166 | 165 | shell: bash |
167 | 166 | run: | |
168 | 167 | set -euo pipefail |
169 | 168 | OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" |
170 | | - CHART_TGZ="$(ls -1 dist/cacheppuccino-*.tgz | head -n 1)" |
171 | | - helm push "${CHART_TGZ}" "oci://ghcr.io/${OWNER_LC}" |
| 169 | + OCI_REPO="oci://ghcr.io/${OWNER_LC}" |
| 170 | + PACKAGE_FILE="$(ls -1 dist/cacheppuccino-*.tgz | head -n 1)" |
| 171 | + IMAGE="${{ needs.docker.outputs.docker_image_tag }}" |
| 172 | +
|
| 173 | + # Add GitHub Actions summary |
| 174 | + echo "# Helm Chart" >> $GITHUB_STEP_SUMMARY |
| 175 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 176 | + echo '```yaml' >> $GITHUB_STEP_SUMMARY |
| 177 | + helm push "$PACKAGE_FILE" "$OCI_REPO" 2>> $GITHUB_STEP_SUMMARY |
| 178 | + echo '```' >> $GITHUB_STEP_SUMMARY |
| 179 | + echo "> [!Important]" >> $GITHUB_STEP_SUMMARY |
| 180 | + echo "> NOTE: Tagged Docker image & Helm chart version: **$IMAGE**" >> $GITHUB_STEP_SUMMARY |
0 commit comments