Skip to content

Commit

Permalink
Test dependent workflows: needs
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardbosch committed Dec 14, 2023
1 parent a7189ba commit a9627a0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/work1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'work1'

# Controls when the action will run
on:
push:
branches:
- '**' # '*' Matches zero or more characters, but does not match the `/` character. '**' matches zero or more of any character.
- '!main'
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
job1:
runs-on: 'ubuntu-latest'

steps:
- name: 'w1-step1'
run: |
date '+%F %H:%M:%S' > time.txt
echo '*** WRITTEN time: '
cat time.txt
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: time
path: time.txt
26 changes: 26 additions & 0 deletions .github/workflows/work2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'work1'

# Controls when the action will run
on:
push:
branches:
- '**' # '*' Matches zero or more characters, but does not match the `/` character. '**' matches zero or more of any character.
- '!main'
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
job1:
runs-on: 'ubuntu-latest'
needs: 'work1.job1'

steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: time

- name: 'w2-step2'
run: |
echo '*** READ time: '
cat time.txt

0 comments on commit a9627a0

Please sign in to comment.