File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 - name : Check that IMAGE_NAME environment variable is created and is valid
2424 run : ' [[ "$IMAGE_NAME" == "hsldevcom/jore4-tools" ]]'
2525
26- # (tests for BRANCH_NAME and COMMIT_ID omitted for now as they might change on each run so its a little bit tricky to test those)
27-
26+ # (tests for BRANCH_NAME, CURRENT_DATE and COMMIT_ID are omitted for now as they might change on each run so its a little bit tricky to test those)
Original file line number Diff line number Diff line change 2828 echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
2929 shell : bash
3030
31+ - name : Extract current date
32+ id : current-date
33+ run : |
34+ # fetches the current date (UTC) in "yyyymmdd" format
35+ CURRENT_DATE=$(date +"%Y%m%d")
36+ echo "CURRENT_DATE=${CURRENT_DATE}" >> "${GITHUB_ENV}"
37+ shell : bash
38+
3139 - name : Extract commit id
3240 id : commit-id
3341 run : |
3442 # Docker tags can use only some special characters.
35- echo "COMMIT_ID=$(echo "${BRANCH_NAME}" | tr -C '0-9a-zA-Z._' '-')-${GITHUB_SHA}" >> $GITHUB_ENV
43+ echo "COMMIT_ID=$(echo "${BRANCH_NAME}" | tr -C '0-9a-zA-Z._' '-')-${CURRENT_DATE}-${ GITHUB_SHA}" >> $GITHUB_ENV
3644 shell : bash
You can’t perform that action at this time.
0 commit comments