mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-08-20 00:37:00 +00:00
chore: removed digest
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
This commit is contained in:
parent
2908dd2558
commit
82d415bfcd
83
.github/workflows/build_container.yaml
vendored
83
.github/workflows/build_container.yaml
vendored
@ -98,7 +98,7 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Build and push by digest
|
- name: Build and push the image
|
||||||
id: build
|
id: build
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@ -113,58 +113,39 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
${{ env.REGISTRY_IMAGE }}:latest
|
${{ env.REGISTRY_IMAGE }}:latest
|
||||||
${{ env.REGISTRY_IMAGE }}:${{ needs.prepare_ci_run.outputs.DATETIME }}
|
${{ env.REGISTRY_IMAGE }}:${{ needs.prepare_ci_run.outputs.DATETIME }}
|
||||||
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
|
outputs: type=image,push=true
|
||||||
|
|
||||||
- name: Export digest
|
merge:
|
||||||
run: |
|
name: Create and Push Manifest List
|
||||||
mkdir -p ${{ runner.temp }}/digests
|
needs: build
|
||||||
echo "${{ steps.build.outputs.digest }}" > "${{ runner.temp }}/digests/${{ env.PLATFORM_PAIR }}.digest"
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Upload digest
|
- name: Set up Docker Buildx
|
||||||
uses: actions/upload-artifact@v4
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
|
||||||
name: digests-${{ env.PLATFORM_PAIR }}
|
|
||||||
path: ${{ runner.temp }}/digests/*
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
merge:
|
- name: Docker meta
|
||||||
name: Create and Push Manifest List
|
id: meta
|
||||||
needs: build
|
uses: docker/metadata-action@v5
|
||||||
# if: github.event_name == 'push' && needs.prepare_ci_run.outputs.NON_FORKED_AND_NON_ROBOT_RUN == 'true'
|
with:
|
||||||
runs-on: ubuntu-latest
|
images: ${{ env.REGISTRY_IMAGE }}
|
||||||
steps:
|
tags: |
|
||||||
- name: Download digests
|
type=ref,event=branch
|
||||||
uses: actions/download-artifact@v4
|
type=ref,event=pr
|
||||||
with:
|
type=semver,pattern={{version}}
|
||||||
path: ${{ runner.temp }}/digests
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
pattern: digests-*
|
type=raw,value=dev-${{ needs.prepare_ci_run.outputs.DATETIME }}
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Create manifest list and push
|
||||||
uses: docker/login-action@v3
|
run: |
|
||||||
with:
|
docker manifest create ${{ env.REGISTRY_IMAGE }}:${{ needs.prepare_ci_run.outputs.DATETIME }} \
|
||||||
registry: ghcr.io
|
${{ env.REGISTRY_IMAGE }}:latest \
|
||||||
username: ${{ github.actor }}
|
${{ env.REGISTRY_IMAGE }}:${{ needs.prepare_ci_run.outputs.DATETIME }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
docker manifest push ${{ env.REGISTRY_IMAGE }}:${{ needs.prepare_ci_run.outputs.DATETIME }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY_IMAGE }}
|
|
||||||
tags: |
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=pr
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=raw,value=dev-${{ needs.prepare_ci_run.outputs.DATETIME }}
|
|
||||||
|
|
||||||
- name: Create manifest list and push
|
|
||||||
working-directory: ${{ runner.temp }}/digests
|
|
||||||
run: |
|
|
||||||
digests=$(printf "${{ env.REGISTRY_IMAGE }}@%s " $(cat *.*_
|
|
Loading…
Reference in New Issue
Block a user