Skip to content

use checkout action #61

use checkout action

use checkout action #61

Workflow file for this run

name: CI
on:
push:
branches:
- main
- test
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
permissions:
actions: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install necessary tools
run: |
apt update
apt install -y git subversion curl make gcc g++ autoconf file appstream libssl-dev
- name: Checkout
uses: actions/checkout@v4
- name: Run build script
run: ./build.sh
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: nmap AppImage
path: |
*.AppImage
*.AppImage.zsync
- name: Get last github release version
id: last_version
uses: pozetroninc/[email protected]
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: Start tmate session
uses: mxschmitt/action-tmate@v3
- name: Create a dummy commit to keep the repository active
uses: iTrooz/keepalive-workflow@master