diff --git a/.github/workflows/check-upstream.main.kts b/.github/workflows/check-upstream.main.kts index 8f850054a..d116332de 100755 --- a/.github/workflows/check-upstream.main.kts +++ b/.github/workflows/check-upstream.main.kts @@ -27,13 +27,13 @@ workflow( command = """ git clone --branch master --single-branch https://bitbucket.org/snakeyaml/snakeyaml-engine.git cd snakeyaml-engine - NUMBER_OF_COMMITS=$(git log --oneline $(cat ../upstream-commit.txt)..master | wc -l) + git log --oneline $(cat ../upstream-commit.txt)..master | wc -l > number-of-commits.txt """.trimIndent() ) run( name = "Create an SVG with the number of commits", command = """ - echo "${'$'}NUMBER_OF_COMMITS" > badge.svg + echo "${'$'}(cat number-of-commits.txt)" > badge.svg """.trimIndent() ) run(command = "cat badge.svg") diff --git a/.github/workflows/check-upstream.yaml b/.github/workflows/check-upstream.yaml index 18d60cefb..236a0100e 100644 --- a/.github/workflows/check-upstream.yaml +++ b/.github/workflows/check-upstream.yaml @@ -31,9 +31,9 @@ jobs: run: |- git clone --branch master --single-branch https://bitbucket.org/snakeyaml/snakeyaml-engine.git cd snakeyaml-engine - NUMBER_OF_COMMITS=$(git log --oneline $(cat ../upstream-commit.txt)..master | wc -l) + git log --oneline $(cat ../upstream-commit.txt)..master | wc -l > number-of-commits.txt - id: 'step-2' name: 'Create an SVG with the number of commits' - run: 'echo "$NUMBER_OF_COMMITS" > badge.svg' + run: 'echo "$(cat number-of-commits.txt)" > badge.svg' - id: 'step-3' run: 'cat badge.svg'