Skip to content

Commit b39c7f6

Browse files
authored
Merge pull request #2 from tainguyenbp/feat/lear-rust-lang
test with main branch
2 parents e65bdb9 + 10c5a9a commit b39c7f6

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/gha-security-checks.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,22 @@ jobs:
8282
else
8383
echo "No repository name change detected."
8484
fi
85+
security_check_production_main:
86+
runs-on: ubuntu-latest
87+
# if: startsWith(github.ref, 'refs/heads/main')
88+
if: ${{ (startsWith(github.ref, 'refs/heads/main') && contains('["tainguyenbp"]', github.actor)) }}
89+
environment: production
90+
# runs-on: [self-hosted, Linux, X64] # run with runner self hosted
91+
steps:
92+
- name: Check Repository Name Changes
93+
if: startsWith(github.ref, 'refs/heads/main')
94+
run: |
95+
if [ "$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})" != "" ]; then
96+
echo "Repository name changed. Triggering security checks..."
97+
echo "${{ github.event.before }} - ${{ github.sha }}"
98+
99+
# Add security checks and notifications here
100+
# You can send telegram notifications
101+
else
102+
echo "No repository name change detected."
103+
fi

github-action-basic/gha-security-checks.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,22 @@ jobs:
8282
else
8383
echo "No repository name change detected."
8484
fi
85+
security_check_production_main:
86+
runs-on: ubuntu-latest
87+
# if: startsWith(github.ref, 'refs/heads/main')
88+
if: ${{ (startsWith(github.ref, 'refs/heads/main') && contains('["tainguyenbp"]', github.actor)) }}
89+
environment: production
90+
# runs-on: [self-hosted, Linux, X64] # run with runner self hosted
91+
steps:
92+
- name: Check Repository Name Changes
93+
if: startsWith(github.ref, 'refs/heads/main')
94+
run: |
95+
if [ "$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})" != "" ]; then
96+
echo "Repository name changed. Triggering security checks..."
97+
echo "${{ github.event.before }} - ${{ github.sha }}"
98+
99+
# Add security checks and notifications here
100+
# You can send telegram notifications
101+
else
102+
echo "No repository name change detected."
103+
fi

0 commit comments

Comments
 (0)