All checks were successful
Build BAB Application Deployment Artifact / build (push) Successful in 3m3s
49 lines
1.7 KiB
YAML
49 lines
1.7 KiB
YAML
name: Build BAB Application Deployment Artifact
|
|
run-name: ${{ gitea.actor }} is building a BAB App artifact 🚀
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- devel
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '20.x'
|
|
- name: Install yarn
|
|
run: npm install --global yarn
|
|
- name: Install yarn dependencies
|
|
run: yarn install
|
|
- name: Install Quasar CLI
|
|
run: yarn global add @quasar/cli
|
|
- name: 'Create env file'
|
|
run: |
|
|
echo "${{ secrets.ENV_FILE }}" > .env
|
|
- name: Build Project
|
|
run: quasar build -m pwa
|
|
- name: Get Version Number
|
|
id: get_version
|
|
run: echo "::set-output name=VERSION::$(node -p "require('./package.json').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
|
|
# path: dist/pwa/
|
|
- 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 }}" }'
|