forked from darveshkumar1610/DevOps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCICD with GitHub Actions
39 lines (33 loc) · 952 Bytes
/
CICD with GitHub Actions
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
git init .
git remote add origin <http-link-repository>
git remote -v
git add .
git commit -m "Initial Commit"
git push origin master
git remote remove origin
git remote add origin https://<auth-token>@github.com/<user>/<repository>
git push origin master
mkdir .github
cd .github
mkdir workflows
cd workflows
Create auth-token for repository and workflows to access the workflows which contains YAML files to use Github actions.
# First GitHub Action
name: My First GitHub Action
on: [push]
jobs:
print-hello-world:
runs-on: ubuntu-latest
steps:
- run: echo "hello world!!!!"
GitHub actions do not guarantee run the Workflow YAML objects in sequence but the list/array of jobs will run in sequence.
# GitHub Actions Checkout Repository
name: My First GitHub Action
on: [push]
jobs:
print-hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: tree