Skip to content

Commit

Permalink
Fix release workflow (#5095)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo authored and kamilchodola committed Jan 4, 2023
1 parent cd40732 commit 07b9f06
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release-nethermind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
BUILD_TIMESTAMP: ${{ steps.build-runner.outputs.BUILD_TIMESTAMP }}
COMMIT_HASH: ${{ steps.build-runner.outputs.COMMIT_HASH }}
PACKAGE_PREFIX: ${{ steps.archive.outputs.PACKAGE_PREFIX }}
PRERELEASE: ${{ contains(github.event.inputs.tag, '-') }}
PRERELEASE: ${{ steps.build-runner.outputs.PRERELEASE }}
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -60,6 +60,7 @@ jobs:
echo "BUILD_TIMESTAMP=$build_timestamp" >> $GITHUB_OUTPUT
echo "COMMIT_HASH=$commit_hash" >> $GITHUB_OUTPUT
echo "COMMIT_HASH_SHORT=$(echo $commit_hash | awk '{print substr($0,0,8);}')" >> $GITHUB_OUTPUT
echo "PRERELEASE=${{ contains(github.event.inputs.tag, '-') }}" >> $GITHUB_OUTPUT
$SCRIPTS_PATH/build-runner.sh ${{ github.event.inputs.tag }} $commit_hash $build_timestamp
- name: Build Nethermind.Cli
run: $SCRIPTS_PATH/build-cli.sh ${{ github.event.inputs.tag }} ${{ steps.build-runner.outputs.COMMIT_HASH }} ${{ steps.build-runner.outputs.BUILD_TIMESTAMP }}
Expand Down Expand Up @@ -207,12 +208,12 @@ jobs:
if: success()
run: |
echo "${{ secrets.DOCKER_ACCESS_TOKEN }}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build and push image to Docker registry (major) / trigger DAppNode build
- name: Build and push image to Docker Hub / Trigger DAppNode build
if: needs.build.outputs.PRERELEASE == 'false'
run: |
docker buildx build --platform=linux/amd64,linux/arm64 -t "${{ env.DOCKER_IMAGE }}:latest" -t "${{ env.DOCKER_IMAGE }}:${{ github.event.inputs.tag }}" -f Dockerfile --build-arg COMMIT_HASH=${{ needs.build.outputs.COMMIT_HASH }} --build-arg BUILD_TIMESTAMP=${{ needs.build.outputs.BUILD_TIMESTAMP }} . --push
curl -s -X POST -u "${{ secrets.REPOSITORY_DISPATCH_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" -d '{"event_type":"dappnode","client_payload":{"tag":"${{ github.event.inputs.tag }}"}}' https://api.github.com/repos/$GITHUB_REPOSITORY/dispatches
- name: Build and push image to Docker registry (patch)
- name: Build and push image to Docker Hub
if: needs.build.outputs.PRERELEASE == 'true'
run: |
docker buildx build --platform=linux/amd64,linux/arm64 -t "${{ env.DOCKER_IMAGE }}:unstable" -t "${{ env.DOCKER_IMAGE }}:${{ github.event.inputs.tag }}" -f Dockerfile --build-arg COMMIT_HASH=${{ needs.build.outputs.COMMIT_HASH }} --build-arg BUILD_TIMESTAMP=${{ needs.build.outputs.BUILD_TIMESTAMP }} . --push
Expand Down

0 comments on commit 07b9f06

Please sign in to comment.