-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (101 loc) · 4.05 KB
/
actions.yml
File metadata and controls
124 lines (101 loc) · 4.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Actions Workflow
on:
push:
branches:
# This workflow would run if we push to "master" only
- master
# This also works with expressions. It can match wildcards * to match a word
- 'feature/*'
# The ** matches
- 'feature/**'
# This would ignore a specific branch feature/featC but all others would match wiht the filters above
- '!feature/featC'
# Use branches-ignore to run the workflow on all branches except the specified ones
# You cannot use both branches and branches-ignore at the same time.
# branches-ignore:
# - null
tags:
# Tags uses the same expression syntax
- v1.*
paths:
# This following would run the workflow whenever a .js file is pushed
- '**.js'
- '!filename.js"'
# You can also use paths-ignore. You cannot use paths and paths-ignore at the same time
# paths-ignore:
# - '**docs/**'
pull_request:
branches:
# This means the workflow runs if the pull request is merging to "master"
- master
# A scheduled event
# schedule:
# Minutes, Hours, DayOfMonth, Month, DayOfWeek (UTC Times)
# Means run every minute, every hour, every DayOfMonth, every Month, every DayOfWeek
#- cron: "* * * * * "
# Means run on minute 1 of every hour, every DayOfMonth, every Month, every DayOfWeek
#- cron: "1 * * * * "
# Means run on minutes 1 and 5 of every hour, every DayOfMonth, every Month, every DayOfWeek
#- cron: "1,5 * * * * "
# Means run on minutes 1 to 5 of every hour, every DayOfMonth, every Month, every DayOfWeek
#- cron: "1-5 * * * * "
# Means every 15 minutes(starting on minute 0), every hour, every DayOfMonth, every Month, every DayOfWeek
#- cron: "0/15 * * * * "
# Run at 12 and 2 every day
#- cron: "0 12,2 * * * "
# Run at 12 pm, every month on day 1"
#- cron: "0 12 1 * * "
# Run at 12 pm, on day 1, in January"
#- cron: "0 12 1 1 * "
# Run at 12 pm, on Sundays (0-6 where 0 is Sunday and 6 is Saturday)
#- cron: "0 12 * * 0"
# At 12:00 on Sunday in February"
#- cron: "0 12 * FEB 0"
# At 12:00 on Monday in February"
#- cron: "0 12 * FEB MON"
# Every 2 minutes
# - cron: "0/2 * * * *"
# ... and every 6 minutes
# - cron: "0/3 * * * *"
# pull_request:
# You can specify activity types as objects
# types: [closed, assigned, opened, reopened]
# Repository_dispatch is an event that can be triggered manually by sending a HTTP POST request to a URL
# repository_dispatch:
# types: [build]
jobs:
run-github-actions:
runs-on: ubuntu-latest
steps:
#- name: Checkout
# uses: actions/checkout@v2
# Display the payload from the repository dispatch event
- name: payload
run: echo ${{ github.event.client_payload.env }}
- name: List Files After Checkout
run: |
pwd
ls -a
# These env vars are set automatically
# This is the commit SHA ID that triggered this action to run
echo $GITHUB_SHA
# This is the repository name
echo $GITHUB_REPOSITORY
# This is the workspace directory
echo $GITHUB_WORKSPACE
# This is a token you can use to authenticate with the github repo
echo "${{ github.token }}"
# Just ideas: (you'll need to google how to embed your github.token here )
# git clone "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
# git checkout $GITHUB_SHA
- name: Simple JS Action
id: greet
# you can reference a branch (e.g. master), a tag version (i.e. v1), or a commit number
# Using a branch is usually discouraged since it can change.
uses: actions/hello-world-javascript-action@v1
# Use the 'with' key to provide an input to the action
with:
who-to-greet: John
- name: Log Greeting Time
# Reference another action's output
run: echo "${{ steps.greet.outputs.time }}"