Skip to content

Commit

Permalink
- updates ci:debug
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Jun 19, 2024
1 parent c4d0a8b commit 6bd1075
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,22 @@ jobs:
--format '{{index .Config.Labels "checksum"}}' \
${{ vars.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }})
code_checksum="${{ steps.build_args.outputs.checksum }}"
echo "::notice:: Checksum found '${image_checksum}' expected '${code_checksum}'"
if [[ -z $image_checksum ]]; then
if [[ -z "$image_checksum" ]]; then
echo "::warning:: No image checksum found"
echo "updated=false" >> $GITHUB_OUTPUT
elif [[ $image_checksum == $code_checksum ]]; then
echo "::notice:: Image is updated"
echo "updated=true" >> $GITHUB_OUTPUT
else
echo "::warning:: Checksum: found '${image_checksum}' expected '${code_checksum}'"
echo "updated=false" >> $GITHUB_OUTPUT
fi
- name: "---"
shell: bash
run: |
echo "Image Status"
echo ${{ steps.image_status.updated }}
echo "========== Labels"
echo "${{ steps.meta.outputs.labels }}"
echo "========== annotations"
Expand Down Expand Up @@ -110,27 +114,29 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v6
id: build_push
if: ${{ steps.image_status.updated != 'true' }}
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: "${{ steps.meta.outputs.labels }}\na=1\nb=2"
annotations: "${{ steps.meta.outputs.annotations }}\nchecksum=${{ steps.build_args.outputs.checksum }}\ncommit=${{ steps.build_args.outputs.source_commit }}"
target: 'python_dev_deps'
file: ./docker/Dockerfile
platforms: linux/amd64
push: true
sbom: true
provenance: true
cache-from: type=registry,ref=${{ vars.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}-cache
cache-to: type=registry,ref=${{ vars.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}-cache,mode=max,image-manifest=true
build-args: |
BUILD_DATE=${{ steps.build_args.outputs.build_date }}
CHECKSUM=${{ steps.build_args.outputs.checksum }}
VERSION=${{ steps.meta.outputs.version }}
SOURCE_COMMIT=${{ steps.build_args.outputs.source_commit }}
GITHUB_SERVER_URL=${{ github.server_url }}
GITHUB_REPOSITORY=${{ github.repository }}
shell: bash
run: echo "BUILDING...."
# if: ${{ steps.image_status.updated != 'true' }}
# with:
# context: .
# tags: ${{ steps.meta.outputs.tags }}
# labels: "${{ steps.meta.outputs.labels }}\na=1\nb=2"
# annotations: "${{ steps.meta.outputs.annotations }}\nchecksum=${{ steps.build_args.outputs.checksum }}\ncommit=${{ steps.build_args.outputs.source_commit }}"
# target: 'python_dev_deps'
# file: ./docker/Dockerfile
# platforms: linux/amd64
# push: true
# sbom: true
# provenance: true
# cache-from: type=registry,ref=${{ vars.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}-cache
# cache-to: type=registry,ref=${{ vars.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}-cache,mode=max,image-manifest=true
# build-args: |
# BUILD_DATE=${{ steps.build_args.outputs.build_date }}
# CHECKSUM=${{ steps.build_args.outputs.checksum }}
# VERSION=${{ steps.meta.outputs.version }}
# SOURCE_COMMIT=${{ steps.build_args.outputs.source_commit }}
# GITHUB_SERVER_URL=${{ github.server_url }}
# GITHUB_REPOSITORY=${{ github.repository }}

# - uses: int128/docker-manifest-create-action@v2
# with:
Expand Down

0 comments on commit 6bd1075

Please sign in to comment.