Add Ref and Commit outputs (#1180)
Some checks failed
Build and Test / test (macos-latest) (push) Waiting to run
Build and Test / test (windows-latest) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Failing after 18s
Check dist / check-dist (push) Successful in 23s
Licensed / Check licenses (push) Successful in 20s
Build and Test / build (push) Failing after 27s
Build and Test / test-proxy (push) Failing after 22s
Build and Test / test (ubuntu-latest) (push) Failing after 49s
Build and Test / test-git-container (push) Failing after 19s
Build and Test / test-bypass-proxy (push) Failing after 42s
Build and Test / test-output (push) Successful in 13s

Signed-off-by: Luca Comellini <luca.com@gmail.com>
This commit is contained in:
Luca Comellini
2024-09-05 08:57:13 -07:00
committed by GitHub
parent 2d7d9f7ff5
commit b684943689
5 changed files with 45 additions and 2 deletions

View File

@@ -295,3 +295,37 @@ jobs:
uses: actions/checkout@v4.1.6
with:
path: localClone
test-output:
runs-on: ubuntu-latest
steps:
# Clone this repo
- name: Checkout
uses: actions/checkout@v4.1.6
# Basic checkout using git
- name: Checkout basic
id: checkout
uses: ./
with:
ref: test-data/v2/basic
# Verify output
- name: Verify output
run: |
echo "Commit: ${{ steps.checkout.outputs.commit }}"
echo "Ref: ${{ steps.checkout.outputs.ref }}"
if [ "${{ steps.checkout.outputs.ref }}" != "test-data/v2/basic" ]; then
echo "Expected ref to be test-data/v2/basic"
exit 1
fi
if [ "${{ steps.checkout.outputs.commit }}" != "82f71901cf8c021332310dcc8cdba84c4193ff5d" ]; then
echo "Expected commit to be 82f71901cf8c021332310dcc8cdba84c4193ff5d"
exit 1
fi
# needed to make checkout post cleanup succeed
- name: Fix Checkout
uses: actions/checkout@v4.1.6