Skip to content

Commit

Permalink
updates actions
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Jun 13, 2024
1 parent adffd64 commit f07663a
Showing 1 changed file with 25 additions and 26 deletions.
51 changes: 25 additions & 26 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,28 @@ jobs:
- name: Build and push
if: steps.image_updated.outputs.updated != 'true' || inputs.force == 'true'
run: |
echo "==========="
# uses: docker/build-push-action@v5
# with:
# context: .
# tags: ${{ inputs.image }}
# target: ${{ inputs.target }}
# file: ./docker/Dockerfile
# platforms: linux/amd64
# outputs: type=registry
# cache-from: "type=registry,ref=${{inputs.image}}-buildcache,mode=max"
# cache-to: "type=registry,ref=${{inputs.image}}-buildcache,mode=max"
# labels: BuildNumber=${{ steps.setup.outputs.build_number }},
# build-args: |
# BUILD_DATE=${{ steps.setup.outputs.date }}
# CHECKSUM=${{ steps.release_hash.outputs.hash }}
# VERSION=${{ inputs.version }}
# SOURCE_COMMIT=${{ env.LAST_COMMIT_SHA }}
# GITHUB_SERVER_URL=${{ github.server_url }}
# GITHUB_REPOSITORY=${{ github.repository }}
# - name: Dump Image Info
# run: |
# echo "Pulling... ${{ inputs.image }}"
# docker pull --platform linux/amd64 ${{ inputs.image }}
# docker inspect --format='{{json .Config.Labels}}' ${{ inputs.image }}
# docker run --platform linux/amd64 -t ${{ inputs.image }} release-info.sh
# echo "----------"
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ inputs.image }}
target: ${{ inputs.target }}
file: ./docker/Dockerfile
platforms: linux/amd64
outputs: type=registry
cache-from: "type=registry,ref=${{inputs.image}}-buildcache,mode=max"
cache-to: "type=registry,ref=${{inputs.image}}-buildcache,mode=max"
labels: BuildNumber=${{ steps.setup.outputs.build_number }},
build-args: |
BUILD_DATE=${{ steps.setup.outputs.date }}
CHECKSUM=${{ steps.release_hash.outputs.hash }}
VERSION=${{ inputs.version }}
SOURCE_COMMIT=${{ env.LAST_COMMIT_SHA }}
GITHUB_SERVER_URL=${{ github.server_url }}
GITHUB_REPOSITORY=${{ github.repository }}
- name: Dump Image Info
run: |
echo "Pulling... ${{ inputs.image }}"
docker pull --platform linux/amd64 ${{ inputs.image }}
docker inspect --format='{{json .Config.Labels}}' ${{ inputs.image }}
docker run --platform linux/amd64 -t ${{ inputs.image }} release-info.sh
echo "----------"

0 comments on commit f07663a

Please sign in to comment.