File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,12 +47,23 @@ jobs:
4747 username : ${{ github.actor }}
4848 password : ${{ secrets.GITHUB_TOKEN }}
4949
50+ - name : Get build start time
51+ run : |
52+ echo BUILD_TIMESTAMP="$(date --utc --iso-8601=seconds)" >> $GITHUB_ENV
53+
5054 - name : Build and push Docker image
5155 uses : docker/build-push-action@v3
5256 with :
5357 context : .
5458 push : true
5559 tags : ${{ env.BUILD_IMAGE }}
60+ build-args : |
61+ BUILD_TIMESTAMP=${{ env.BUILD_TIMESTAMP }}
62+ BUILD_URL=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
63+ DOCKER_TAG=${{ env.BUILD_IMAGE }}
64+ GIT_BRANCH=${{ github.ref_name }}
65+ GIT_COMMIT=${{ github.sha }}
66+ GIT_URL=${{ github.repositoryUrl }}
5667
5768 outputs :
5869 build_image : ${{ env.BUILD_IMAGE }}
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ RUN bundle install --local
127127# ------------------------------------------------------------
128128# Preserve build arguments
129129
130- # passed in by Jenkins
130+ # passed in by CI
131131ARG BUILD_TIMESTAMP
132132ARG BUILD_URL
133133ARG DOCKER_TAG
You can’t perform that action at this time.
0 commit comments