Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
Upload differently
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsporn committed Nov 16, 2023
1 parent 65168dc commit afc619a
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/feature-network-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,12 @@ jobs:
working-directory: tools/genesis-snapshot
run: go run -tags=rocksdb . --config feature --seed 7R1itJx5hVuo9w9hjg5cwKFmek4HMSoBDgJZN8hKGxih --filename genesis-snapshot.bin

- name: Upload genesis snapshot
uses: actions/upload-artifact@v3
with:
name: snapshot.bin
path: tools/genesis-snapshot/genesis-snapshot.bin

- name: Get artifact URL
id: get-snapshot-url
- name: Upload snapshot
id: upload-snapshot
run: |
ARTIFACT_URL=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" | jq -r '.artifacts[] | select(.name=="snapshot.bin") | .archive_download_url')
echo "Artifact URL: $ARTIFACT_URL"
echo "artifact_url=$ARTIFACT_URL" >> $GITHUB_OUTPUT
SNAPSHOT_URL=$(curl -T ./tools/genesis-snapshot/genesis-snapshot.bin https://transfer.sh)
echo "Snapshot URL: $SNAPSHOT_URL"
echo "snapshot_url=$SNAPSHOT_URL" >> $GITHUB_OUTPUT
- # Temp fix
# https://github.com/docker/build-push-action/issues/252
Expand All @@ -95,7 +89,7 @@ jobs:
- name: Ansible deploy
env:
CUSTOM_SNAPSHOT_URL: '${{ github.event.inputs.snapshotUrl }}'
DEFAULT_SNAPSHOT_URL: '${{ steps.get-snapshot-url.outputs.artifact_url }}'
DEFAULT_SNAPSHOT_URL: '${{ steps.upload-snapshot.outputs.snapshot_url }}'
NETWORK_ENVIRONMENT: '${{ secrets.NETWORK_ENVIRONMENT }}'
IOTA_CORE_DOCKER_IMAGE_REPO: 'iotaledger/iota-core'
IOTA_CORE_DOCKER_IMAGE_TAG: 'feature'
Expand Down

0 comments on commit afc619a

Please sign in to comment.