Skip to content

Commit

Permalink
Output $PV at build stage
Browse files Browse the repository at this point in the history
  • Loading branch information
me-and committed Jan 17, 2023
1 parent 4720e4a commit dbf54c9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ on:
required: false
type: string
default: cygport
outputs:
pv:
description: The $PV value from the cygport file
value: ${{ jobs.build-test.outputs.pv }}

jobs:
build-test:
name: Build and test
runs-on: windows-latest
env:
CYGPORT_FILE: ${{ inputs.cygport_file }}
outputs:
pv: ${{ steps.data.outputs.pv }}
steps:

- name: Configure Git for Windows' core.autocrlf
Expand Down Expand Up @@ -69,15 +75,17 @@ jobs:
add-to-path: false

- name: Load data from cygport file
id: data
shell: C:\cygwin\bin\bash.exe --noprofile --norc -e -o pipefail -o igncr {0}
env:
PATH: C:\cygwin\bin
run: |
eval "$(cygport "$CYGPORT_FILE" vars NAME PF ARCH BUILD_REQUIRES)"
eval "$(cygport "$CYGPORT_FILE" vars NAME PF PV ARCH BUILD_REQUIRES)"
printf 'CYGPORT_NAME=%s\n' "$NAME" | tee -a "$GITHUB_ENV"
printf 'CYGPORT_PF=%s\n' "$PF" | tee -a "$GITHUB_ENV"
printf 'CYGPORT_ARCH=%s\n' "$ARCH" | tee -a "$GITHUB_ENV"
printf 'CYGPORT_BUILD_REQUIRES=%s\n' "$BUILD_REQUIRES" | tee -a "$GITHUB_ENV"
printf 'pv=%s\n' "$PV" | tee -a "$GITHUB_OUTPUT"
- name: Install Cygwin build requirements
uses: cygwin/cygwin-install-action@db475590d56881c6cef7b3f96f6f3dd9532ea1f4
Expand Down

0 comments on commit dbf54c9

Please sign in to comment.