Skip to content

Commit

Permalink
2024-06-14 18:36 - updates
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Jun 14, 2024
1 parent 7de2025 commit 5cb701e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
33 changes: 22 additions & 11 deletions .github/actions/docker_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/last_commit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV}
5 changes: 0 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 5cb701e

Please sign in to comment.