refactor: update build pipeline
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 2m0s

This commit is contained in:
2024-06-23 23:46:22 -04:00
parent 6167a713dd
commit 70c6837858
5 changed files with 53 additions and 26 deletions

View File

@@ -30,26 +30,15 @@ jobs:
- name: Show env file
run: |
/bin/cat .env.local
- name: Build Project
run: npm run build
- name: Set VERSION from VERSION file
id: get_version
- name: Set GITEA_TOKEN variable
run: echo "GITEA_TOKEN=${{ secrets.GT_TOKEN }}" >> $GITEA_ENV
- name: Build and Release
id: build
run: |
VERSION=$(cat VERSION)
echo "VERSION=$VERSION"
echo "::set-output name=VERSION::$VERSION"
- name: Tarfile
run: |
cd dist/pwa
tar czf ../../build-${{ steps.get_version.outputs.VERSION }}.tar.gz .
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: build-artifact-${{ steps.get_version.outputs.VERSION }}.${{ gitea.run_number }}
path: build-${{ steps.get_version.outputs.VERSION }}.tar.gz
semantic-version
- name: Trigger Ansible Deploy Playbook
uses: https://github.com/distributhor/workflow-webhook@v3
with:
webhook_url: ${{ vars.WEBHOOK_URL }}
verbose: true
data: '{ "artifact_url": "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id}}/artifacts/build-artifact-${{ steps.get_version.outputs.VERSION }}.${{ gitea.run_number }}" }'
data: '{ "artifact_url": "${{ gitea.server_url }}/${{ gitea.repository }}/releases/download/${{ steps.build.outputs.VERSION }}/release-${{ steps.build.outputs.VERSION }}.tar.gz" }'