Skip to content

Commit 6b51aaa

Browse files
committed
trigger test
1 parent cf0b2fe commit 6b51aaa

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/github-actions-push-image.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ jobs:
1818
push_to_registry:
1919
name: Push Docker image to Docker Hub
2020
runs-on: ubuntu-latest
21-
env:
22-
TRUSTED_CONTRIBUTORS: ${{ secrets.TRUSTED_CONTRIBUTORS }}
23-
if: >
24-
github.event_name == 'push' ||
25-
contains(env.TRUSTED_CONTRIBUTORS, github.actor)
21+
2622
permissions:
2723
packages: write
2824
contents: read
@@ -32,6 +28,20 @@ jobs:
3228
- name: Check out the repo
3329
uses: actions/checkout@v4
3430

31+
- name: Check if user is trusted
32+
env:
33+
TRUSTED_CONTRIBUTORS: ${{ secrets.TRUSTED_CONTRIBUTORS }}
34+
run: |
35+
IFS=',' read -ra USERS <<< "$TRUSTED_CONTRIBUTORS"
36+
for user in "${USERS[@]}"; do
37+
if [[ "${{ github.actor }}" == "${user// /}" ]]; then
38+
echo "User ${{ github.actor }} is trusted"
39+
exit 0
40+
fi
41+
done
42+
echo "Error: User ${{ github.actor }} is not in trusted contributors list"
43+
exit 1
44+
3545
- name: Log in to Docker Hub
3646
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
3747
with:

src/logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
def print_logs(text):
1212
if show_errors_in_console:
1313
print(text)
14-
# test comment. Action trigger
14+
# test comment. Action trigger

0 commit comments

Comments
 (0)