Skip to content

Commit

Permalink
Merge pull request #2393 from lf-lang/match-rti-digest
Browse files Browse the repository at this point in the history
Matching image digest between `latest` tag and latest release tag of `rti` image on DockerHub
  • Loading branch information
lhstrh authored Aug 4, 2024
2 parents 37912cc + bbc3ca6 commit 56ba716
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/actions/push-rti-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
DOCKERHUB_TOKEN:
description: 'The token to log in to Docker Hub'
required: true
latest:
description: 'Also push as latest tag if true'
default: 'false'
runs:
using: "composite"
steps:
Expand All @@ -34,3 +37,13 @@ runs:
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/riscv64
push: true
tags: lflang/rti:${{ inputs.tag }}
if: ${{ inputs.latest == 'false' }}
- name: Build and push as latest
uses: docker/build-push-action@v6
with:
file: ./core/src/main/resources/lib/c/reactor-c/core/federated/RTI/rti.Dockerfile
context: ./core/src/main/resources/lib/c/reactor-c
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/riscv64
push: true
tags: lflang/rti:${{ inputs.tag }}, lflang/rti:latest
if: ${{ inputs.latest == 'true' }}
6 changes: 5 additions & 1 deletion .github/workflows/rti-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ jobs:
uses: ./.github/actions/push-rti-docker
with:
tag: ${{ env.lf_version }}
latest: false
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ endsWith(env.lf_version, '-snapshot') }}

- name: Update latest (released versions only)
uses: ./.github/actions/push-rti-docker
with:
tag: latest
tag: ${{ env.lf_version }}
latest: true
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ !endsWith(env.lf_version, '-snapshot') }}

0 comments on commit 56ba716

Please sign in to comment.