Skip to content

Commit 850bb55

Browse files
committed
Revived subworkflow and composite action test and remove all the stale notes
1 parent 4d5c068 commit 850bb55

File tree

1 file changed

+11
-22
lines changed

1 file changed

+11
-22
lines changed
Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# This tests having a "subworkflow" using reusable workflows
22
# https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
3-
# This doesn't really work how I'd like it to right now, but in the future it might:
4-
# https://github.community/t/ref-head-in-reusable-workflows/203690/4
5-
# -- Edit: Work's how I'd hope now! https://github.blog/changelog/2022-01-25-github-actions-reusable-workflows-can-be-referenced-locally/
63
# ==========================
74
# There's a second variant using composite actions instead
85
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
@@ -15,34 +12,26 @@
1512
# It also seems to be a watered down version of the workflow syntax. (For instance naming steps doesn't work.)
1613
# -- Actualy naming steps supposedly should work, but doesn't appear anywhere from what I can see https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsname
1714
# -- It's still a watered down version of the workflow syntax though.
18-
# I think it's probably best that we wait for local reusable workflows.
19-
# Sadly this isn't on the GitHub roadmap yet, so I'm not holding my breath on it.
20-
# In theory I just hard-code the owner/repo and `main` reference but that doesn't really jive well with my CI development workflow...
2115
name: Subworkflow Test
2216
on: [workflow_dispatch]
2317
jobs:
2418
test:
2519
name: Main job thing
26-
# This does not work, very annoying they don't have any special syntax for "Just use a file in this repo"
27-
#uses: ${{github.repository}}/.github/workflows/subworkflow.yml@${{github.sha}}
28-
# This doesn't work either, seems expressions just aren't even allowed here.
29-
#uses: PathogenPlayground/GitHubActionsTest/.github/workflows/subworkflow.yml@${{github.sha}}
30-
#uses: PathogenPlayground/GitHubActionsTest/.github/workflows/subworkflow.yml@main
31-
# Just released! https://github.blog/changelog/2022-01-25-github-actions-reusable-workflows-can-be-referenced-locally/
20+
# Using a workflow from the local repo
3221
uses: ./.github/workflows/subworkflow.yml
3322
with:
3423
username: Path
3524
test-noname:
3625
uses: ./.github/workflows/subworkflow.yml
3726
with:
3827
username: Pathogen
39-
# test2:
40-
# name: Test using composite action
41-
# runs-on: ubuntu-latest
42-
# steps:
43-
# - uses: actions/checkout@v2
44-
# - id: foo
45-
# uses: ./.github/workflows/hello-world-composite-action
46-
# with:
47-
# who-to-greet: Path
48-
# - run: echo random-number ${{ steps.foo.outputs.random-number }}
28+
test2:
29+
name: Test using composite action
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v2
33+
- id: foo
34+
uses: ./.github/workflows/hello-world-composite-action
35+
with:
36+
who-to-greet: Path
37+
- run: echo random-number ${{ steps.foo.outputs.random-number }}

0 commit comments

Comments
 (0)