Skip to content

CI

CI #48

Workflow file for this run

name: CI
on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
container:
image: ubuntu:16.04
steps:
- name: Install necessary tools
run: |
apt update
apt install -y git subversion curl make gcc g++ autoconf file appstream libssl-dev
# actions/checkout will fallback because git is too old, and gautamkrishnar/keepalive-workflow won't work
- name: Checkout
run: git clone https://github.com/iTrooz/nmap-appimage .
- name: Run build script
run: ./build.sh
- name: Upload AppImage
uses: actions/upload-artifact@v3
with:
name: nmap AppImage
path: |
*.AppImage
*.AppImage.zsync
- name: Get last github release version
id: last_version
uses: pozetroninc/github-action-get-latest-release@v0.6.0
with:
repository: ${{ github.repository }}
- name: Get nmap release version
run: echo "NMAP_VERSION=`cat NMAP_VERSION`" >> $GITHUB_ENV
- name: Print both versions
run: |
echo "Latest release is ${{ steps.last_version.outputs.release }}"
echo "Build version is ${{ env.NMAP_VERSION }}"
- name: Create release if new nmap version
if: "${{ env.NMAP_VERSION != steps.last_version.outputs.release }}"
uses: ncipollo/release-action@v1
with:
artifacts: "*.AppImage,*.AppImage.zsync"
tag: ${{env.NMAP_VERSION}}
- name: Create a dummy commit to keep the repository active
uses: gautamkrishnar/keepalive-workflow@v1