99jobs :
1010
1111 build-image :
12-
1312 runs-on : ubuntu-latest
14-
1513 steps :
1614 - uses : actions/checkout@v4
1715
16+ - name : Set build date
17+ run : echo "DATE=$(date +'%Y%m%d')" >> "$GITHUB_ENV"
18+
1819 - name : Prepare u-boot tree
1920 run : |
2021 bash build.sh setup_tree
@@ -23,21 +24,28 @@ jobs:
2324 - uses : docker/setup-qemu-action@v3
2425 - uses : docker/setup-buildx-action@v3
2526
26- - name : Build and push
27- uses : docker/build-push-action@v6
27+ - uses : docker/login-action@v3
2828 with :
29- platforms : linux/amd64,linux/arm64
30- push : false
31- tags : onion/u-boot-builder
29+ username : ${{ secrets.DOCKERHUB_USERNAME }}
30+ password : ${{ secrets.DOCKERHUB_TOKEN }}
3231
33- - name : Build multi-arch image and push
32+ - name : Build multiarch image and push
3433 uses : docker/build-push-action@v6
3534 with :
3635 context : .
3736 file : ./Dockerfile
3837 platforms : linux/amd64,linux/arm64
39- push : false
40- tags : onion/u-boot-builder:latest
38+ push : true
39+ tags : |
40+ onion/u-boot-builder:latest
41+ onion/u-boot-builder:${{ env.DATE }}
42+ # onion/u-boot-builder:${{ env.DATE }}-${{ github.sha::7 }}
4143 # tags: ${{ env.REGISTRY }}/u-boot-builder:${{ github.sha }}
42- # cache-from: type=registry,ref=${{ env.REGISTRY }}/u-boot-builder:buildcache
43- # cache-to: type=registry,ref=${{ env.REGISTRY }}/u-boot-builder:buildcache,mode=max
44+ # cache-from: type=registry,ref=${{ env.REGISTRY }}/u-boot-builder:buildcache
45+ # cache-to: type=registry,ref=${{ env.REGISTRY }}/u-boot-builder:buildcache,mode=max
46+ cache-from : type=registry,ref=onion/u-boot-builder:buildcache
47+ cache-to : type=registry,ref=onion/u-boot-builder:buildcache,mode=max
48+
49+ - name : Export image tag
50+ id : meta
51+ run : echo "tag=onion/u-boot-builder:${{ env.DATE }}
0 commit comments