Skip to content

Commit 12dd5b1

Browse files
committed
Build and push dev tag first
to not cache from stale stages as otherwise caching from multple regestry images seems error prone
1 parent e5bef97 commit 12dd5b1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/update_ci_image.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,24 @@ jobs:
9191
trigger=true
9292
fi
9393
echo "::set-output name=trigger::${trigger}"
94-
- name: Build and push ${{ github.ref_name }}
94+
- name: Build and push ${{ github.ref_name }}-dev
9595
if: steps.config.outputs.trigger == 'true'
9696
id: docker_build
9797
uses: docker/build-push-action@v4
9898
with:
9999
pull: true
100100
push: true
101101
no-cache: ${{ steps.config.outputs.no_cache }}
102-
cache-from: type=registry,ref=ghcr.io/ros-planning/navigation2:${{ github.ref_name }}
102+
cache-from: type=registry,ref=ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev
103103
cache-to: type=inline
104-
target: builder
104+
target: tester
105105
tags: |
106-
ghcr.io/ros-planning/navigation2:${{ github.ref_name }}
107-
ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-${{ steps.config.outputs.timestamp }}
106+
ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev
107+
ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev-${{ steps.config.outputs.timestamp }}
108108
- name: Image digest
109109
if: steps.config.outputs.trigger == 'true'
110110
run: echo ${{ steps.docker_build.outputs.digest }}
111-
- name: Build and push ${{ github.ref_name }}-dev
111+
- name: Build and push ${{ github.ref_name }}
112112
if: steps.config.outputs.trigger == 'true'
113113
id: docker_build
114114
uses: docker/build-push-action@v4
@@ -117,10 +117,10 @@ jobs:
117117
push: true
118118
cache-from: type=registry,ref=ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev
119119
cache-to: type=inline
120-
target: tester
120+
target: builder
121121
tags: |
122-
ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev
123-
ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev-${{ steps.config.outputs.timestamp }}
122+
ghcr.io/ros-planning/navigation2:${{ github.ref_name }}
123+
ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-${{ steps.config.outputs.timestamp }}
124124
- name: Image digest
125125
if: steps.config.outputs.trigger == 'true'
126126
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)