Skip to content

DAS CLI Build

DAS CLI Build #32

Workflow file for this run

---
name: DAS CLI Build
on:
workflow_dispatch:
inputs:
version:
description: "Version"
required: true
jobs:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Dockerfile
run: docker build -t das-cli:latest .
- name: Build das-cli binary
run: docker run --rm -v "$(pwd)/dist/":/app/das/dist -e DAS_CLI_VERSION=${{ github.event.inputs.version }} das-cli:latest
- name: Upload das-cli artifact
uses: actions/upload-artifact@v4
with:
name: das-cli
path: dist/*
tag:
needs: build
if: github.ref == 'refs/heads/master'
uses: singnet/das-scripts-pipeline/.github/workflows/action.yml@master
with:
version: ${{ github.event.inputs.version }}
version-strategy: bump-version-from-variable-value
job-image-namespace: trueagi
job-image-version-semver: semantic-versioning
main-branch: master
version-tag-regex-pattern: /^\d+\.\d+\.\d+$/
version-require-confirmation: "true"
secrets: inherit
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs: build
steps:
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
- name: Download das-cli artifact
uses: actions/download-artifact@v4
with:
name: das-cli
path: packages
- name: Copy files to server
run: |
scp -r packages/* ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }}:${{ vars.SERVER_DEB_PACKAGES_PATH }}