fix (actions): fixed package dependencies #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build debian package | |
on: [push] | |
jobs: | |
build-debian-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🏗 Install build dependencies | |
run: sudo apt-get -qq update | |
- run: sudo apt-get -y install python3 python3-dev python3-pip libcurl4 build-essential python3-tornado python3-setuptools debhelper cdbs dh-python fakeroot python3-pip rsync locales | |
- run: pip3 install virtualenv | |
- name: 🏗 Create virtual python env | |
run: virtualenv -p /usr/bin/python3 hotspot-env | |
- name: 🏗 Activate virtual python env | |
run: source hotspot-env/bin/activate | |
- name: ⬇ Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Add current Date to env vars | |
run: echo "CURRENT_DATE=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV | |
- name: Add Version to env vars | |
run: echo "VERSION=$(head -1 debian/changelog | awk -F'[()]' '{print $2}')" >> $GITHUB_ENV | |
- name: Replace version Number for testing build | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
run: sed -i -e "s/${{ env.VERSION }}/${{ env.VERSION }}+${{ env.CURRENT_DATE }}/g" debian/changelog | |
- name: 🔨 Build Debian package | |
run: sudo make deb | |
- name: Add Package Name to env var | |
run: echo "FILE_NAME=$(ls -a ../*.deb)" >> $GITHUB_ENV | |
- name: Decrypt fabscan key secret | |
run: ./.github/scripts/decrypt_file.sh | |
env: | |
FABSCAN_KEY_PASSPHRASE: ${{ secrets.FABSCAN_KEY_PASSPHRASE }} | |
- name: change keyfile permission | |
run: chmod 600 $HOME/secrets/fabscan.key | |
- name: deploy build artifact | |
run: LC_ALL=C scp -o StrictHostKeyChecking=no -i $HOME/secrets/fabscan.key ${{ env.FILE_NAME }} ${{ secrets.FABSCAN_DEPLOY_USER }}@mariolukas.de:/var/deploy/release/. |