Skip to content

Commit

Permalink
Add REVNUMBER environment variable in CI (#1848)
Browse files Browse the repository at this point in the history
fixes #1847
  • Loading branch information
t-sommer committed Jan 31, 2023
1 parent 224382d commit 7b76a85
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ jobs:
name: schema-figures
path: docs/images/schema

- name: List variables
- name: Generate revnumber
run: |
[[ $GITHUB_REF_TYPE == "tag" ]] && REVNUMBER=${GITHUB_REF:11} || REVNUMBER=${GITHUB_SHA:0:7}
echo GITHUB_SHA: $GITHUB_SHA
echo GITHUB_REF_TYPE: $GITHUB_REF_TYPE
echo GITHUB_REF: $GITHUB_REF
echo REVNUMBER: $REVNUMBER
echo "REVNUMBER=$REVNUMBER" >> $GITHUB_ENV
- name: Create build directory
run: |
Expand All @@ -73,7 +74,7 @@ jobs:
- name: Generate HTML
uses: avattathil/asciidoctor-action@master
with:
program: "asciidoctor --base-dir . --destination-dir=build --backend=html5 --attribute=revnumber=$REVNUMBER --attribute=revdate=$(date +%F) docs/index.adoc"
program: "asciidoctor --base-dir . --destination-dir=build --backend=html5 --attribute=revnumber=${{ env.REVNUMBER }} --attribute=revdate=$(date +%F) docs/index.adoc"

- name: Copy resources
run: |
Expand Down

0 comments on commit 7b76a85

Please sign in to comment.