From 5cb701eadb8ed6e7d2aa2e0a4547612f5b1bf950 Mon Sep 17 00:00:00 2001 From: sax Date: Fri, 14 Jun 2024 18:36:24 +0200 Subject: [PATCH] 2024-06-14 18:36 - updates --- .github/actions/docker_build/action.yml | 33 ++++++++++++++++--------- .github/actions/last_commit/action.yml | 4 +-- .github/workflows/test.yml | 5 ---- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.github/actions/docker_build/action.yml b/.github/actions/docker_build/action.yml index a5ffcc77..06b71415 100644 --- a/.github/actions/docker_build/action.yml +++ b/.github/actions/docker_build/action.yml @@ -97,17 +97,21 @@ runs: build_date=$(date +"%Y-%m-%d %H:%M") echo "date=$build_date" >> $GITHUB_OUTPUT echo "image=${tag%:*}" >> $GITHUB_OUTPUT - - name: Setup Environment (PR) - if: ${{ github.event_name == 'pull_request' }} - shell: bash - run: | - SHA=${{ github.event.pull_request.head.sha }} - echo "LAST_COMMIT_SHA=${SHA::7}" >> ${GITHUB_ENV} - - name: Setup Environment (Push) - if: ${{ github.event_name == 'push' }} - shell: bash - run: | - echo "LAST_COMMIT_SHA=${GITHUB_SHA::7}" >> ${GITHUB_ENV} + - name: Retrieve Last Commit Hash + id: last_commit + uses: ./.github/actions/last_commit + +# - name: Setup Environment (PR) +# if: ${{ github.event_name == 'pull_request' }} +# shell: bash +# run: | +# SHA=${{ github.event.pull_request.head.sha }} +# echo "LAST_COMMIT_SHA=${SHA::7}" >> ${GITHUB_ENV} +# - name: Setup Environment (Push) +# if: ${{ github.event_name == 'push' }} +# shell: bash +# run: | +# echo "LAST_COMMIT_SHA=${GITHUB_SHA::7}" >> ${GITHUB_ENV} - shell: bash run: | echo "" @@ -126,6 +130,13 @@ runs: echo "build : ${{steps.image_updated.outputs.updated != 'true' || inputs.force == 'true'}}" echo "commit_sha : ${{env.LAST_COMMIT_SHA}}" echo "=====================================" + echo "BUILD_DATE=${{ steps.setup.outputs.date }} + echo "CHECKSUM=${{ steps.release_hash.outputs.hash }} + echo "VERSION=${{ steps.version.outputs.version }} + echo "SOURCE_COMMIT=${{ env.LAST_COMMIT_SHA }} + echo "GITHUB_SERVER_URL=${{ github.server_url }} + echo "GITHUB_REPOSITORY=${{ github.repository }} + echo "=====================================" - uses: docker/login-action@v3 with: username: ${{ inputs.username }} diff --git a/.github/actions/last_commit/action.yml b/.github/actions/last_commit/action.yml index 63a7d91c..488e226b 100644 --- a/.github/actions/last_commit/action.yml +++ b/.github/actions/last_commit/action.yml @@ -7,9 +7,9 @@ runs: if: ${{ github.event_name == 'pull_request' }} shell: bash run: | - echo "last_commit_sha=${{ github.event.pull_request.head.sha }}" >> ${GITHUB_ENV} + echo "LAST_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> ${GITHUB_ENV} - name: Setup Environment (Push) if: ${{ github.event_name == 'push' }} shell: bash run: | - echo "last_commit_sha=${GITHUB_SHA}" >> ${GITHUB_ENV} \ No newline at end of file + echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7fbd6464..81e18933 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -114,11 +114,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Dump - run: | - echo "=====================================" - echo "${{ toJSON(needs.build.outputs) }}" - echo "=====================================" - name: Run tests run: | docker run --rm \