@@ -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 : |
0 commit comments