|
36 | 36 | trigger: ${{ steps.check.outputs.trigger }}
|
37 | 37 | no_cache: ${{ steps.check.outputs.no_cache }}
|
38 | 38 | container:
|
39 |
| - image: ghcr.io/ros-planning/navigation2:main |
| 39 | + image: ghcr.io/ros-planning/navigation2:${{ github.ref_name }} |
40 | 40 | steps:
|
41 | 41 | - name: "Check apt updates"
|
42 | 42 | id: check
|
@@ -91,20 +91,41 @@ jobs:
|
91 | 91 | trigger=true
|
92 | 92 | fi
|
93 | 93 | echo "::set-output name=trigger::${trigger}"
|
94 |
| - - name: Build and push |
| 94 | + - name: Build and push ${{ github.ref_name }} |
95 | 95 | if: steps.config.outputs.trigger == 'true'
|
96 | 96 | id: docker_build
|
97 | 97 | uses: docker/build-push-action@v4
|
98 | 98 | with:
|
99 | 99 | pull: true
|
100 | 100 | push: true
|
101 | 101 | no-cache: ${{ steps.config.outputs.no_cache }}
|
102 |
| - cache-from: type=registry,ref=ghcr.io/ros-planning/navigation2:main |
| 102 | + cache-from: type=registry,ref=ghcr.io/ros-planning/navigation2:${{ github.ref_name }} |
103 | 103 | cache-to: type=inline
|
104 | 104 | target: builder
|
105 | 105 | tags: |
|
106 |
| - ghcr.io/ros-planning/navigation2:main |
107 |
| - ghcr.io/ros-planning/navigation2:main-${{ steps.config.outputs.timestamp }} |
| 106 | + ghcr.io/ros-planning/navigation2:${{ github.ref_name }} |
| 107 | + ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-${{ steps.config.outputs.timestamp }} |
| 108 | + - name: Image digest |
| 109 | + if: steps.config.outputs.trigger == 'true' |
| 110 | + run: echo ${{ steps.docker_build.outputs.digest }} |
| 111 | + - name: Build and push ${{ github.ref_name }}-dev |
| 112 | + if: steps.config.outputs.trigger == 'true' |
| 113 | + id: docker_build |
| 114 | + uses: docker/build-push-action@v4 |
| 115 | + with: |
| 116 | + pull: true |
| 117 | + push: true |
| 118 | + cache-from: | |
| 119 | + type=registry,ref=ghcr.io/ros-planning/navigation2:${{ github.ref_name }} |
| 120 | + type=registry,ref=ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev |
| 121 | + cache-to: type=inline |
| 122 | + build-args: | |
| 123 | + RUN_TESTS=True |
| 124 | + FAIL_ON_TEST_FAILURE='' |
| 125 | + target: tester |
| 126 | + tags: | |
| 127 | + ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev |
| 128 | + ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev-${{ steps.config.outputs.timestamp }} |
108 | 129 | - name: Image digest
|
109 | 130 | if: steps.config.outputs.trigger == 'true'
|
110 | 131 | run: echo ${{ steps.docker_build.outputs.digest }}
|
0 commit comments