Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
authorLuca Comellini <luca.com@gmail.com>2024-09-05 08:57:13 -0700
committerGitHub <noreply@github.com>2024-09-05 11:57:13 -0400
commitc16730ea86aff221caa4464dfa9ec944a94e6b36 (patch)
treed8f764819a838daa3508f71c980eecc82e87d5a9 /.github/workflows/test.yml
parent5124486016880e81b011eeffffe04d4b918740ec (diff)
Add Ref and Commit outputs (#1180)
Signed-off-by: Luca Comellini <luca.com@gmail.com>
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r--.github/workflows/test.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1ef3c31..cde9f06 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -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