From 260d7e1ed2a4b79f15c992d44fbbff9d3455e69e Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 21:54:03 +0100 Subject: [PATCH 01/11] Revert "Change directory to inside checked out repo (#3493)" This reverts commit 332c1fb07bd787bab8a8eeea5fc896a944bb54d8. --- .github/workflows/update_ci_image.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index 3888fba1233..c1c871d79a4 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -27,7 +27,6 @@ jobs: id: check if: github.event_name == 'push' run: | - cd navigation2 version=$(grep -oP '(?<=).*?(?=)' navigation2/package.xml) echo "version=${version}" >> $GITHUB_OUTPUT echo "trigger=true" >> $GITHUB_OUTPUT From d0a25533da3b659e92748f410cec46c1a3b39553 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 21:54:45 +0100 Subject: [PATCH 02/11] Enable branch for testing --- .github/workflows/update_ci_image.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index c1c871d79a4..6121be51f7b 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -8,6 +8,7 @@ on: push: branches: - main + - container-retention-version paths: - '**/package.xml' - '**/*.repos' From 7cebfe7bc216bebbb3ff9ca9cbda3d413ea5553c Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 21:56:06 +0100 Subject: [PATCH 03/11] Debugging shell --- .github/workflows/update_ci_image.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index 6121be51f7b..54c0bf2e591 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -29,6 +29,9 @@ jobs: if: github.event_name == 'push' run: | version=$(grep -oP '(?<=).*?(?=)' navigation2/package.xml) + pwd + ls -alh + echo $version echo "version=${version}" >> $GITHUB_OUTPUT echo "trigger=true" >> $GITHUB_OUTPUT echo "no_cache=false" >> $GITHUB_OUTPUT From ddc2a28ef828e88ba1806e971b293b418e62d3d6 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 21:59:55 +0100 Subject: [PATCH 04/11] Avoid reserved env `version` --- .github/workflows/update_ci_image.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index 54c0bf2e591..ba17a05fde9 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -28,11 +28,11 @@ jobs: id: check if: github.event_name == 'push' run: | - version=$(grep -oP '(?<=).*?(?=)' navigation2/package.xml) + nav2_version=$(grep -oP '(?<=).*?(?=)' navigation2/package.xml) pwd ls -alh - echo $version - echo "version=${version}" >> $GITHUB_OUTPUT + echo $nav2_version + echo "nav2_version=${nav2_version}" >> $GITHUB_OUTPUT echo "trigger=true" >> $GITHUB_OUTPUT echo "no_cache=false" >> $GITHUB_OUTPUT check_ci_image: @@ -110,7 +110,7 @@ jobs: target: builder tags: | ghcr.io/${{ github.repository }}:${{ github.ref_name }} - ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.config.outputs.version }} + ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.config.outputs.nav2_version }} - name: Image digest if: steps.config.outputs.trigger == 'true' run: echo ${{ steps.docker_build.outputs.digest }} From 4887c85541155ca8dd68efd72a16990e6e644f15 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 22:02:07 +0100 Subject: [PATCH 05/11] Revert "Avoid reserved env `version`" This reverts commit ddc2a28ef828e88ba1806e971b293b418e62d3d6. --- .github/workflows/update_ci_image.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index ba17a05fde9..54c0bf2e591 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -28,11 +28,11 @@ jobs: id: check if: github.event_name == 'push' run: | - nav2_version=$(grep -oP '(?<=).*?(?=)' navigation2/package.xml) + version=$(grep -oP '(?<=).*?(?=)' navigation2/package.xml) pwd ls -alh - echo $nav2_version - echo "nav2_version=${nav2_version}" >> $GITHUB_OUTPUT + echo $version + echo "version=${version}" >> $GITHUB_OUTPUT echo "trigger=true" >> $GITHUB_OUTPUT echo "no_cache=false" >> $GITHUB_OUTPUT check_ci_image: @@ -110,7 +110,7 @@ jobs: target: builder tags: | ghcr.io/${{ github.repository }}:${{ github.ref_name }} - ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.config.outputs.nav2_version }} + ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.config.outputs.version }} - name: Image digest if: steps.config.outputs.trigger == 'true' run: echo ${{ steps.docker_build.outputs.digest }} From e1b151ad063f3afd2dfe3d9a021822198d8e523f Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 22:06:09 +0100 Subject: [PATCH 06/11] Add `version` to outputs for check step and use output from `check` id --- .github/workflows/update_ci_image.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index 54c0bf2e591..a677068768c 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -20,6 +20,7 @@ jobs: name: Check CI Files runs-on: ubuntu-latest outputs: + version: ${{ steps.check.outputs.version }} trigger: ${{ steps.check.outputs.trigger }} no_cache: ${{ steps.check.outputs.no_cache }} steps: @@ -110,7 +111,7 @@ jobs: target: builder tags: | ghcr.io/${{ github.repository }}:${{ github.ref_name }} - ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.config.outputs.version }} + ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.check.outputs.version }} - name: Image digest if: steps.config.outputs.trigger == 'true' run: echo ${{ steps.docker_build.outputs.digest }} From 57cc1143785fb8f3a14c90d50954eedb021f2dad Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 22:12:55 +0100 Subject: [PATCH 07/11] Propogate `version` output via `config` id --- .github/workflows/update_ci_image.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index a677068768c..add70670881 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -42,6 +42,7 @@ jobs: needs: check_ci_files runs-on: ubuntu-latest outputs: + version: ${{ steps.check.outputs.version }} trigger: ${{ steps.check.outputs.trigger }} no_cache: ${{ steps.check.outputs.no_cache }} container: @@ -111,7 +112,7 @@ jobs: target: builder tags: | ghcr.io/${{ github.repository }}:${{ github.ref_name }} - ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.check.outputs.version }} + ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.config.outputs.version }} - name: Image digest if: steps.config.outputs.trigger == 'true' run: echo ${{ steps.docker_build.outputs.digest }} From d2a7d407ef42a5c82eab8f6a24be2be03ec93aa1 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 22:18:42 +0100 Subject: [PATCH 08/11] Revert "Propogate `version` output via `config` id" This reverts commit 57cc1143785fb8f3a14c90d50954eedb021f2dad. --- .github/workflows/update_ci_image.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index add70670881..a677068768c 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -42,7 +42,6 @@ jobs: needs: check_ci_files runs-on: ubuntu-latest outputs: - version: ${{ steps.check.outputs.version }} trigger: ${{ steps.check.outputs.trigger }} no_cache: ${{ steps.check.outputs.no_cache }} container: @@ -112,7 +111,7 @@ jobs: target: builder tags: | ghcr.io/${{ github.repository }}:${{ github.ref_name }} - ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.config.outputs.version }} + ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.check.outputs.version }} - name: Image digest if: steps.config.outputs.trigger == 'true' run: echo ${{ steps.docker_build.outputs.digest }} From e68edf453b8e8e1f2e1ab5311a9f159095270e72 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 22:29:26 +0100 Subject: [PATCH 09/11] Use output from check_ci_files job --- .github/workflows/update_ci_image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index a677068768c..cf6f2dfc1a4 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -111,7 +111,7 @@ jobs: target: builder tags: | ghcr.io/${{ github.repository }}:${{ github.ref_name }} - ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.check.outputs.version }} + ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ needs.check_ci_files.outputs.version }} - name: Image digest if: steps.config.outputs.trigger == 'true' run: echo ${{ steps.docker_build.outputs.digest }} From 635d1f1274f93e660d3f5954972545ec5674d260 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 22:30:05 +0100 Subject: [PATCH 10/11] Revert "Debugging shell" This reverts commit 7cebfe7bc216bebbb3ff9ca9cbda3d413ea5553c. --- .github/workflows/update_ci_image.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index cf6f2dfc1a4..abdc0c3bd4b 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -30,9 +30,6 @@ jobs: if: github.event_name == 'push' run: | version=$(grep -oP '(?<=).*?(?=)' navigation2/package.xml) - pwd - ls -alh - echo $version echo "version=${version}" >> $GITHUB_OUTPUT echo "trigger=true" >> $GITHUB_OUTPUT echo "no_cache=false" >> $GITHUB_OUTPUT From 0e477d5aee78c6a9152492d05060343b7cc03348 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 20 Mar 2023 22:37:17 +0100 Subject: [PATCH 11/11] Revert "Enable branch for testing" This reverts commit d0a25533da3b659e92748f410cec46c1a3b39553. --- .github/workflows/update_ci_image.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index abdc0c3bd4b..d6807f531ef 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -8,7 +8,6 @@ on: push: branches: - main - - container-retention-version paths: - '**/package.xml' - '**/*.repos'