File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 77 - ' source/typescript-node/Dockerfile'
88
99jobs :
10- build :
10+ build-and-push :
1111 runs-on : ubuntu-latest
1212 steps :
1313 - uses : actions/checkout@v4
@@ -17,19 +17,19 @@ jobs:
1717
1818 - name : Login to Docker Hub
1919 run : |
20- docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
20+ echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
2121
22- - name : Generate nightly ID with commit
22+ - name : Generate build tag
2323 run : |
2424 TIMESTAMP=$(date +'%Y%m%d')
2525 SHA=$(git rev-parse --short HEAD)
26- echo "NIGHTLY_ID =nightly-${TIMESTAMP}-${SHA}" >> $GITHUB_ENV
26+ echo "BUILD_TAG =nightly-${TIMESTAMP}-${SHA}" >> $GITHUB_ENV
2727
2828 - name : Build & Push Docker image
2929 uses : docker/build-push-action@v6
3030 with :
3131 context : source/typescript-node
3232 push : true
33- tags : ${{ secrets.DOCKERHUB_USERNAME }}/typescript-node:nightly- ${{ env.NIGHTLY_ID }}
33+ tags : ${{ secrets.DOCKERHUB_USERNAME }}/typescript-node:${{ env.BUILD_TAG }}
3434 cache-from : type=gha
3535 cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments