tmate #60
Workflow file for this run
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: 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 | |
# 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@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 |