Skip to content

Commit fbb7fac

Browse files
authored
Fix permission setting
1 parent 3aac326 commit fbb7fac

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ jobs:
182182
actions: write
183183
pull-requests: write
184184
steps:
185-
- uses: plengauer/opentelemetry-github/actions/instrument/deploy@v5.16.4
185+
- uses: plengauer/opentelemetry-github/actions/instrument/deploy@v5.16.5
186186
env:
187187
OTEL_EXPORTER_OTLP_ENDPOINT: '${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}'
188188
OTEL_EXPORTER_OTLP_HEADERS: '${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}'

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.16.4
1+
5.16.5

actions/instrument/deploy/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ runs:
110110
(ls "${{ inputs.workflows_directory }}"/*.yaml "${{ inputs.workflows_directory }}"/*.yml 2> /dev/null || true) | while read -r workflow_file; do
111111
cat "$workflow_file" | yq '.jobs | keys[]' | while read -r job_name; do
112112
cat "$workflow_file" | yq ".jobs.$job_name.steps" | grep -qvF null || continue
113-
if [ cat "$workflow_file" | yq ".jobs.$job_name.permissions" != null ] && [ "$(cat "$workflow_file" | yq ".jobs.$job_name.permissions.actions")" != read ] && [ "$(cat "$workflow_file" | yq ".jobs.$job_name.permissions.actions")" != write ]; then
113+
if [ "$(cat "$workflow_file" | yq ".jobs.$job_name.permissions")" != null ] && [ "$(cat "$workflow_file" | yq ".jobs.$job_name.permissions.actions")" != read ] && [ "$(cat "$workflow_file" | yq ".jobs.$job_name.permissions.actions")" != write ]; then
114114
yq -i ".jobs.$job_name.permissions.actions = \"read\"" "$workflow_file"
115-
elif [ cat "$workflow_file" | yq ".permissions" != null ] && [ "$(cat "$workflow_file" | yq ".permissions.actions")" != read ] && [ "$(cat "$workflow_file" | yq ".permissions.actions")" != write ]; then
115+
elif [ "$(cat "$workflow_file" | yq ".permissions")" != null ] && [ "$(cat "$workflow_file" | yq ".permissions.actions")" != read ] && [ "$(cat "$workflow_file" | yq ".permissions.actions")" != write ]; then
116116
yq -i ".permissions.actions = \"read\"" "$workflow_file"
117117
else
118118
yq -i ".jobs.$job_name.permissions.actions = \"read\"" "$workflow_file"

0 commit comments

Comments
 (0)