CICD: attempt to read file content in GH yaml

It is very strange that in some yaml files the $(<release-version) construct
works just fine, but in others it evaluates to an empty string, even though the
file is there an has the correct content.

Attempting to get more debugging info and also use a different expression to
extract the information.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2024-01-10 17:13:17 -08:00
parent 8fb504941e
commit 2f464c114d
6 changed files with 8 additions and 6 deletions

View file

@ -26,7 +26,7 @@ jobs:
if: github.event_name == 'push'
run: |
bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
version=$(<release-version)
version=$(cat release-version)
echo "version=$version" >> $GITHUB_OUTPUT
- name: store dummy version and build number for non-push build runs

View file

@ -30,7 +30,7 @@ jobs:
if: github.event_name == 'push'
run: |
bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
version=$(<release-version)
version=$(cat release-version)
echo "version=$version" >> $GITHUB_OUTPUT
- name: Setup API token for copr-cli

View file

@ -25,7 +25,8 @@ jobs:
echo "in yml we have PWD $(pwd)"
ls -l release-version
cat release-version
version=$(<release-version)
echo
version=$(cat release-version)
echo "version=$version"
echo "version=$version" >> $GITHUB_OUTPUT

View file

@ -19,7 +19,7 @@ jobs:
if: github.event_name == 'push'
run: |
bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
version=$(<release-version)
version=$(cat release-version)
echo "version=$version" >> $GITHUB_OUTPUT
- name: store dummy version and build number for pull request

View file

@ -23,7 +23,7 @@ jobs:
run: |
bash -x ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
bash scripts/create-releasenotes.sh ${{ github.event.head_commit.id }}
version=$(<release-version)
version=$(cat release-version)
echo "version=$version" >> $GITHUB_OUTPUT
# ironically, we have to upload a file, otherwise this won't create a release with just the release notes

View file

@ -25,7 +25,8 @@ jobs:
echo "in yml we have PWD $(pwd)"
ls -l release-version
cat release-version
version=$(<release-version)
echo
version=$(cat release-version)
echo "version=$version"
echo "version=$version" >> $GITHUB_OUTPUT