Merge pull request #2441 from lf-lang/python-12 #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push RTI Image to Docker Hub | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
name: Build and push RTI to Docker Hub | |
steps: | |
- name: Check out lingua-franca repository | |
uses: actions/checkout@v3 | |
with: | |
repository: lf-lang/lingua-franca | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Look up the current version and export as environment variable | |
run: | | |
export LF_VERSION=$(cat core/src/main/resources/org/lflang/StringsBundle.properties | sed -n 's/.*VERSION = \(.*\)/\1/p' | tr '[:upper:]' '[:lower:]') | |
echo "lf_version=$LF_VERSION" | |
echo "lf_version=$LF_VERSION" >> $GITHUB_ENV | |
- name: Build and push RTI to Docker Hub | |
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') && github.repository_owner == 'lf-lang' }} | |
- name: Update latest (released versions only) | |
uses: ./.github/actions/push-rti-docker | |
with: | |
tag: ${{ env.lf_version }} | |
latest: true | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
if: ${{ !endsWith(env.lf_version, '-snapshot') && github.repository_owner == 'lf-lang' }} |