Skip to content

Commit 157587c

Browse files
authored
update
1 parent 5bccbca commit 157587c

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/compile-ee-logrotate-sepolicy.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,28 @@ jobs:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5353
run: |
5454
# Di chuyển file .pp về thư mục gốc để dễ dàng upload
55-
mv logrotate/selinux-policy/ee-logrotate.pp .
55+
cp logrotate/selinux-policy/ee-logrotate.pp .
5656
gh release upload ${{ steps.get_tag.outputs.latest_tag }} ee-logrotate.pp --clobber
5757
echo "✅ Successfully uploaded ee-logrotate.pp to release '${{ steps.get_tag.outputs.latest_tag }}'"
58+
59+
- name: Commit and push compiled policy to repository
60+
run: |
61+
# Cấu hình git
62+
git config --local user.email "[email protected]"
63+
git config --local user.name "GitHub Action"
64+
65+
# Di chuyển file .pp vào thư mục mong muốn (nếu cần)
66+
# Ở đây giữ nguyên trong thư mục logrotate/selinux-policy/
67+
68+
# Thêm file .pp vào staging
69+
git add logrotate/selinux-policy/ee-logrotate.pp
70+
71+
# Kiểm tra xem có thay đổi nào để commit không
72+
if git diff --staged --quiet; then
73+
echo "No changes to commit"
74+
else
75+
# Commit và push
76+
git commit -m "ci: auto-compiled SELinux policy [skip ci]"
77+
git push
78+
echo "✅ Successfully committed and pushed ee-logrotate.pp to repository"
79+
fi

0 commit comments

Comments
 (0)