Skip to content

Commit

Permalink
rti-docker workflow match digests
Browse files Browse the repository at this point in the history
Update .github/actions/push-rti-docker/action.yml

Co-authored-by: Marten Lohstroh <[email protected]>

Update .github/actions/push-rti-docker/action.yml

Co-authored-by: Marten Lohstroh <[email protected]>

Move if to end of block

Move if to end of block
  • Loading branch information
Depetrol authored and lhstrh committed Aug 4, 2024
1 parent 2d201df commit 634bda0
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 634bda0

Please sign in to comment.