Skip to content

Commit 397729b

Browse files
authored
Merge pull request jitpack#1 from jassu2017/triggering-wf-using-githubaction-events-and-types
Triggering wf using githubaction events and types
2 parents f12b841 + f5eb9d6 commit 397729b

File tree

2 files changed

+38
-30
lines changed

2 files changed

+38
-30
lines changed

.github/workflows/action.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Action Workflow
2+
on: # example of hithub event's types.it can be put as object instead of aaray
3+
push:
4+
pull_request:
5+
types: [closed, assigned, opened, reopened]
6+
jobs:
7+
run-github-actions:
8+
runs-on: ubuntu-latest
9+
steps:
10+
# List files before checkout
11+
- name: List files
12+
run: |
13+
pwd
14+
ls -a # printing the env vars of github actions
15+
echo $GITHUB_SHA
16+
echo $GITHUB_REPOSITORY
17+
echo $GITHUB_WORKSPACE
18+
echo "${{ github.token }}"
19+
20+
# list files after checkout
21+
- name: checkout
22+
uses: actions/checkout@v1
23+
24+
- name: list files after checkout
25+
run: |
26+
pwd
27+
ls -a
28+
29+
30+
- name: simple js Action
31+
id: greet
32+
uses: actions/hello-world-javascript-action@v1
33+
#input
34+
with:
35+
who-to-greet: Jayshree
36+
# output
37+
#- name: Log Greeting time
38+
# run: echo "${{ steps.greet.outputs.time }}"

.github/workflows/simple.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)