adding debug to get release notes correctly #77
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: linea-devnet | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_call: | |
outputs: | |
workflow_run_id: | |
description: "the run id of the workflow" | |
value: ${{ jobs.build.outputs.workflow_run_id }} | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: dockerhub | |
outputs: | |
workflow_run_id: ${{ steps.workflow_details.outputs.id }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: build the linea devnet artifacts | |
id: assemble | |
uses: ./.github/actions/assemble-devnet | |
- name: set up docker buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: login to docker | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER_RW }} | |
password: ${{ secrets.DOCKER_PASSWORD_RW }} | |
- name: set docker build args | |
run: | | |
echo "Building docker tag: ${{ steps.assemble.outputs.dockertag }}" | |
echo "Building docker image: ${{ steps.assemble.outputs.dockerimage }}" | |
- name: build and push the combined manifest | |
uses: docker/build-push-action@v6 | |
env: | |
DOCKER_BUILD_SUMMARY: false | |
with: | |
context: linea-besu/. | |
platforms: linux/arm64,linux/amd64 | |
provenance: false | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
build-args: | | |
VERSION=${{ steps.assemble.outputs.dockertag }} | |
VCS_REF=${{ github.sha }} | |
BUILD_DATE=${{ steps.assemble.outputs.build_date }} | |
push: true | |
tags: | | |
consensys/linea-besu-package:${{ steps.assemble.outputs.dockertag }} | |
### release process artifacts | |
## adds one more tag :latest the above push on a release | |
- name: build and push the combined manifest | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: docker/build-push-action@v6 | |
env: | |
DOCKER_BUILD_SUMMARY: false | |
with: | |
context: linea-besu/. | |
platforms: linux/arm64,linux/amd64 | |
provenance: false | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
build-args: | | |
VERSION=${{ steps.assemble.outputs.dockertag }} | |
VCS_REF=${{ github.sha }} | |
BUILD_DATE=${{ steps.assemble.outputs.build_date }} | |
push: true | |
tags: | | |
consensys/linea-besu-package:devnet-latest | |
### update the release notes with docker hashes | |
- name: create the release notes and then the release | |
if: startsWith(github.ref, 'refs/tags/v') | |
id: release_create_artifacts | |
run: | | |
cd release | |
MANIFEST=$(docker manifest inspect consensys/linea-besu-package:${{ steps.assemble.outputs.dockertag }}) | |
if [ $? -eq 0 ]; then | |
echo "## Docker Image Details" >> output.md | |
echo "" >> output.md | |
echo "To pull the image, use the following command:" >> output.md | |
echo "\`\`\`" >> output.md | |
echo "docker pull consensys/linea-besu-package:${{ steps.assemble.outputs.dockertag }}" >> output.md | |
echo "\`\`\`" >> output.md | |
echo "" >> output.md | |
echo "| Digest | OS | Architecture |" >> output.md | |
echo "|--------|----|--------------|" >> output.md | |
echo "$MANIFEST" | jq -r '.manifests[] | select(.platform.architecture != "unknown" and .platform.os != "unknown") | "| \(.digest) | \(.platform.os) | \(.platform.architecture) |"' >> output.md | |
else | |
echo "Docker image consensys/linea-besu-package:${{ steps.assemble.outputs.dockertag }} does not exist on dockerhub" | |
exit 1 | |
fi | |
- name: upload linea-devnet artifacts | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linea-devnet | |
retention-days: 1 | |
path: | | |
./release |