2025-02-16 12:20:48 +01:00
|
|
|
---
|
2025-02-16 12:23:16 +01:00
|
|
|
name: appimage
|
2025-02-16 12:20:48 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2025-02-16 12:23:16 +01:00
|
|
|
branches: [master]
|
2025-02-16 12:20:48 +01:00
|
|
|
pull_request:
|
2025-02-16 12:23:16 +01:00
|
|
|
branches: [master]
|
2025-02-16 12:20:48 +01:00
|
|
|
env:
|
|
|
|
DESTDIR: ../AppDir
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-appimage:
|
2025-02-16 12:23:16 +01:00
|
|
|
name: build AppImage
|
2025-02-16 12:20:48 +01:00
|
|
|
runs-on: ubuntu-latest
|
2025-02-16 12:24:54 +01:00
|
|
|
container:
|
|
|
|
image: ghcr.io/igaw/linux-nvme/debian:latest
|
2025-02-16 12:20:48 +01:00
|
|
|
steps:
|
2025-02-16 12:24:54 +01:00
|
|
|
- uses: actions/checkout@v4
|
2025-02-16 12:27:38 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: fixup permissions
|
|
|
|
env:
|
|
|
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
|
|
|
run: |
|
|
|
|
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
|
2025-02-16 12:24:54 +01:00
|
|
|
- name: build
|
|
|
|
run: |
|
|
|
|
scripts/build.sh appimage
|
|
|
|
- name: build AppImage
|
|
|
|
uses: AppImageCrafters/build-appimage@v1.3
|
|
|
|
with:
|
|
|
|
recipe: .github/AppImageBuilder.yml
|
2025-02-16 12:25:41 +01:00
|
|
|
- uses: actions/upload-artifact@v4
|
2025-02-16 12:24:54 +01:00
|
|
|
name: upload artifacts to github
|
|
|
|
with:
|
|
|
|
name: AppImage
|
|
|
|
path: '*.AppImage*'
|
2025-02-16 12:24:13 +01:00
|
|
|
|
|
|
|
deploy-appimage:
|
|
|
|
name: deploy AppImage
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build-appimage
|
2025-02-16 12:25:41 +01:00
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'linux-nvme/nvme-cli' }}
|
2025-02-16 12:24:13 +01:00
|
|
|
steps:
|
2025-02-16 12:27:38 +01:00
|
|
|
- uses: actions/download-artifact@v4
|
2025-02-16 12:24:13 +01:00
|
|
|
with:
|
2025-02-16 12:27:38 +01:00
|
|
|
name: AppImage
|
|
|
|
path: AppImage
|
2025-02-16 12:24:13 +01:00
|
|
|
- name: FTP Deployer
|
2025-02-16 12:26:52 +01:00
|
|
|
uses: sand4rt/ftp-deployer@v1.8
|
2025-02-16 12:24:13 +01:00
|
|
|
with:
|
|
|
|
sftp: true
|
|
|
|
host: ${{ secrets.SFTP_SERVER }}
|
|
|
|
port: 22
|
|
|
|
username: ${{ secrets.SFTP_USERNAME }}
|
|
|
|
password: ${{ secrets.SFTP_PASSWORD }}
|
|
|
|
remote_folder: '/upload'
|
|
|
|
local_folder: '.'
|
|
|
|
cleanup: false
|
|
|
|
include: '[ "*", "**/*" ]'
|
|
|
|
exclude: '[".github/**", ".git/**", "*.env"]'
|