forked from Fellowship-Org/hercules-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.04 KB
/
github-pipelines.yml
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
name: CI/CD Pipeline
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 5 # Fetch 5 commits worth of history
- name: Set up Git and Curl
run: |
sudo apt-get update
sudo apt-get install -y git curl
git --version # Verify Git installation
curl --version # Verify curl installation
- name: Cache dependencies (Git & Curl)
uses: actions/cache@v2
with:
path: |
/usr/bin/git
/usr/bin/curl
key: ${{ runner.os }}-git-curl-${{ hashFiles('**/*.sh') }}
restore-keys: |
${{ runner.os }}-git-curl-
- name: Analyze Changes
run: |
chmod +x ./analyze_changes.sh
./analyze_changes.sh HEAD~1 HEAD
- name: Failing Step
run: |
echo "This step will fail"
exit 1 # Force a failure
- name: Syntax error test
run: |
echo "This will cause a syntax error