Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/update_ci_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ 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:
- uses: actions/checkout@v3
- name: "Check package updates"
id: check
if: github.event_name == 'push'
run: |
version=$(grep -oP '(?<=<version>).*?(?=</version>)' navigation2/package.xml)
echo "version=${version}" >> $GITHUB_OUTPUT
echo "trigger=true" >> $GITHUB_OUTPUT
echo "no_cache=false" >> $GITHUB_OUTPUT
check_ci_image:
Expand Down Expand Up @@ -67,6 +63,7 @@ jobs:
- check_ci_image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
Expand All @@ -78,6 +75,9 @@ jobs:
- name: Set build config
id: config
run: |
version=$(grep -oP '(?<=<version>).*?(?=</version>)' navigation2/package.xml)
echo "version=${version}" >> $GITHUB_OUTPUT

no_cache=false
if [ "${{needs.check_ci_files.outputs.no_cache}}" == 'true' ] || \
[ "${{needs.check_ci_image.outputs.no_cache}}" == 'true' ]
Expand All @@ -98,16 +98,17 @@ jobs:
id: docker_build
uses: docker/build-push-action@v4
with:
provenance: false
context: .
pull: true
push: true
provenance: false
no-cache: ${{ steps.config.outputs.no_cache }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:${{ github.ref_name }}
cache-to: type=inline
target: builder
tags: |
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ needs.check_ci_files.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 }}