.gitea/workflows/asw-pipeline.yml +38−0 View file@@ -34,3 +34,41 @@ jobs:
34 34
run: |35 35
test -s dist/alice-sdv-reference.tar.gz36 36
sha256sum --check dist/checksums.sha256 37 +
- name: Store the pipeline artifact 38 +
uses: actions/upload-artifact@v4 39 +
with: 40 +
name: alice-sdv-reference 41 +
path: | 42 +
dist/alice-sdv-reference.tar.gz 43 +
dist/checksums.sha256 44 +
retention-days: 30 45 +
46 +
deploy-local: 47 +
runs-on: ubuntu-latest 48 +
needs: [package] 49 +
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/main' 50 +
steps: 51 +
- uses: actions/checkout@v4 52 +
- name: Retrieve the verified artifact 53 +
uses: actions/download-artifact@v4 54 +
with: 55 +
name: alice-sdv-reference 56 +
path: dist 57 +
- name: Activate on the ALICE local simulator 58 +
env: 59 +
DEPLOY_TOKEN: ${{ secrets.LOCAL_SIMULATOR_DEPLOY_TOKEN }} 60 +
run: | 61 +
CHECKSUM="$(cut -d ' ' -f 1 dist/checksums.sha256)" 62 +
VERSION="$(python -c 'import json; print(json.load(open("package/manifest.json"))["version"])')" 63 +
curl --fail --silent --show-error --retry 3 \ 64 +
-X POST \ 65 +
-H "Authorization: Bearer ${DEPLOY_TOKEN}" \ 66 +
-H "Content-Type: application/octet-stream" \ 67 +
-H "X-A-SW-Repository: ${GITEA_REPOSITORY}" \ 68 +
-H "X-A-SW-Run-ID: ${GITEA_RUN_ID}" \ 69 +
-H "X-A-SW-Commit-SHA: ${GITEA_SHA}" \ 70 +
-H "X-A-SW-Artifact-Name: alice-sdv-reference.tar.gz" \ 71 +
-H "X-A-SW-Checksum: ${CHECKSUM}" \ 72 +
-H "X-A-SW-Version: ${VERSION}" \ 73 +
--data-binary @dist/alice-sdv-reference.tar.gz \ 74 +
http://simulator-target:4300/deployments