Skip to content

Commit ca626b4

Browse files
authored
Merge branch 'main' into plengauer-patch-5
2 parents d563ca1 + aca87cf commit ca626b4

3 files changed

Lines changed: 14 additions & 31 deletions

File tree

.github/workflows/autoapprove.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,20 @@ jobs:
7474
steps:
7575
- uses: plengauer/opentelemetry-github/actions/instrument/job@v5.41.0
7676
with:
77-
secrets_to_redact: '["${{ github.token }}","${{ secrets.ACTIONS_GITHUB_TOKEN }}"]'
77+
secrets_to_redact: '["${{ github.token }}","${{ secrets.PACKAGES_GITHUB_TOKEN }}"]'
7878
env:
7979
OTEL_EXPORTER_OTLP_ENDPOINT: '${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}'
8080
OTEL_EXPORTER_OTLP_HEADERS: '${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}'
81+
8182
- uses: actions/checkout@v6.0.1
8283
with:
83-
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }} # need to use this token for later pushes of tags
8484
ref: ${{ matrix.ref }}
8585
- run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
8686
id: version
8787
- uses: actions/download-artifact@v7.0.0
8888
with:
8989
name: packages_${{ matrix.ref }}
90+
9091
- uses: actions/attest-build-provenance@v3.1.0
9192
with:
9293
subject-path: ./package.deb
@@ -102,12 +103,13 @@ jobs:
102103
- uses: actions/download-artifact@v7.0.0
103104
with:
104105
name: images_${{ matrix.ref }}
106+
105107
- run: |
106108
version="${{ steps.version.outputs.version }}"
107109
major=$(echo "$version" | cut -d . -f 1)
108110
minor=$(echo "$version" | cut -d . -f 2)
109111
patch=$(echo "$version" | cut -d . -f 3)
110-
echo ${{ secrets.ACTIONS_GITHUB_TOKEN }} | sudo docker login ghcr.io -u "$(GH_TOKEN=${{ secrets.ACTIONS_GITHUB_TOKEN }} gh api user -q .login)" --password-stdin
112+
echo ${{ secrets.PACKAGES_GITHUB_TOKEN }} | sudo docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
111113
find . -iname '*.image' | while read -r image_file; do
112114
sudo docker load < "$image_file"
113115
image_name="$image_file"
@@ -120,6 +122,7 @@ jobs:
120122
sudo docker image remove "$image_name"
121123
sudo docker push "ghcr.io/${GITHUB_REPOSITORY%/*}/$image_name" --all-tags
122124
done
125+
123126
- run: |
124127
gh release create "v${{ steps.version.outputs.version }}" \
125128
--title "Release v${{ steps.version.outputs.version }}" \
@@ -130,34 +133,35 @@ jobs:
130133
echo "upload_url=$(gh api repos/${{ github.repository }}/releases | jq '.[] | select(.tag_name == "v${{ steps.version.outputs.version }}") | .upload_url' -r)" >> "$GITHUB_OUTPUT"
131134
id: create_release
132135
env:
133-
GH_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
136+
GH_TOKEN: ${{ github.token }}
137+
134138
- uses: actions/upload-release-asset@v1.0.2
135139
env:
136-
GITHUB_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
140+
GITHUB_TOKEN: ${{ github.token }}
137141
with:
138142
upload_url: ${{ steps.create_release.outputs.upload_url }}
139143
asset_path: ./package.deb
140144
asset_name: opentelemetry-shell_${{ steps.version.outputs.version }}.deb
141145
asset_content_type: application/octet-stream
142146
- uses: actions/upload-release-asset@v1.0.2
143147
env:
144-
GITHUB_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
148+
GITHUB_TOKEN: ${{ github.token }}
145149
with:
146150
upload_url: ${{ steps.create_release.outputs.upload_url }}
147151
asset_path: ./package.rpm
148152
asset_name: opentelemetry-shell_${{ steps.version.outputs.version }}.rpm
149153
asset_content_type: application/octet-stream
150154
- uses: actions/upload-release-asset@v1.0.2
151155
env:
152-
GITHUB_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
156+
GITHUB_TOKEN: ${{ github.token }}
153157
with:
154158
upload_url: ${{ steps.create_release.outputs.upload_url }}
155159
asset_path: ./package.apk
156160
asset_name: opentelemetry-shell_${{ steps.version.outputs.version }}.apk
157161
asset_content_type: application/octet-stream
158162
- uses: eregon/publish-release@v1.0.6
159163
env:
160-
GITHUB_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
164+
GITHUB_TOKEN: ${{ github.token }}
161165
with:
162166
release_id: ${{ steps.create_release.outputs.id }}
163167
- run: |

.github/workflows/test_github.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ jobs:
671671
needs: deploy-smoke
672672
runs-on: ubuntu-latest
673673
permissions:
674+
contents: read
674675
actions: read
675676
strategy:
676677
matrix:
@@ -723,7 +724,7 @@ jobs:
723724
nohup node -e "require('http').createServer(function (req, res) { console.log(req.method, req.url); res.writeHead(200); res.end(); }).listen(8080);" 1> /tmp/http.log 2> /dev/null &
724725
- run: |
725726
printf '%s' '${{ secrets.TEST_GITHUB_TOKEN }}' | GH_TOKEN='${{ secrets.TEST_GITHUB_TOKEN }}' gh secret set DEPLOY_OBSERVABILITY_TOKEN --repo ${{ steps.config.outputs.user }}/${{ steps.config.outputs.repository }}
726-
wget --header "Authorization: Bearer ${{ secrets.ACTIONS_GITHUB_TOKEN }}" https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/README.md -O - | sed -n '/```yaml/,/```/p' | grep -v '```yaml' | sed '/```/,$d' > .github/workflows/deploy_otel.yml
727+
wget --header "Authorization: Bearer ${{ github.token }}" https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/README.md -O - | sed -n '/```yaml/,/```/p' | grep -v '```yaml' | sed '/```/,$d' > .github/workflows/deploy_otel.yml
727728
cat .github/workflows/deploy_otel.yml | yq .jobs.deploy.steps[0].uses | grep -q '/actions/instrument/deploy@'
728729
cat .github/workflows/deploy_otel.yml | yq .jobs.deploy.steps[0].with.github_token | grep -q secrets.DEPLOY_OBSERVABILITY_TOKEN
729730
yq -i 'del(.jobs.deploy.steps[0].env)' .github/workflows/deploy_otel.yml

0 commit comments

Comments
 (0)