diff --git a/.github/workflows/ToolUpdate.yml b/.github/workflows/ToolUpdate.yml index 70da1b6f..6837ac47 100644 --- a/.github/workflows/ToolUpdate.yml +++ b/.github/workflows/ToolUpdate.yml @@ -24,18 +24,27 @@ jobs: run: sudo apt-get install jq - name: Fetch latest version of firely terminal dependency - id: fetch_version + id: fetch_version_firely run: | # Fetch the latest version from the FirelyTeam/firely-terminal-pipeline GitHub repository LATEST_VERSION=$(curl -s https://api.github.com/repos/FirelyTeam/firely-terminal-pipeline/releases/latest | jq -r .tag_name) - echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV + echo "LATEST_VERSION=$LATEST_VERSION_FIRELY" >> $GITHUB_ENV + + - name: Fetch latest version of Sushi dependency + id: fetch_version_sushi + run: | + # Fetch the latest version from the fhir/sushi GitHub repository + LATEST_VERSION=$(curl -s https://api.github.com/repos/FHIR/sushi/releases/latest | jq -r .tag_name) + echo "LATEST_VERSION=$LATEST_VERSION_SUSHI" >> $GITHUB_ENV + # TODO add an if statement to prevent the workflow from running if the version is the same as the one in the main.yml file - - name: Update main.yml + - name: Update main.yml for Firely and Sushi run: | - # Update the main.yml file with the new version + # Update the main.yml file with the new versions of Firely and Sushi sed -i "s|uses: FirelyTeam/firely-terminal-pipeline@.*|uses: FirelyTeam/firely-terminal-pipeline@$LATEST_VERSION|" .github/workflows/main.yml + sed -i "s|uses: FHIR/sushi - name: Commit changes env: