Skip to content

Nightly

Nightly #40

Workflow file for this run

name: Nightly
on:
workflow_dispatch:
schedule:
- cron: '17 3 * * 1'
jobs:
check:
name: Pre-check
runs-on: 'ubuntu-latest'
steps:
- uses: octokit/request-action@v2.x
id: check_last_run
with:
route: GET /repos/${{github.repository}}/actions/workflows/nightly.yml/runs?per_page=1&status=completed
env:
GITHUB_TOKEN: ${{ github.token }}
- run: |
echo Last nightly commit: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }}
echo Current run commit: ${{ github.sha }}
echo Should run: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha != github.sha }}
outputs:
should_run: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha != github.sha }}
build:
name: Build
needs: [check]
if: ${{ needs.check.outputs.should_run }}
uses: ./.github/workflows/reusable-build.yml
virustotal:
needs: [build]
if: needs.check.outputs.last_sha != github.sha
name: VirusTotal Scan
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 10
steps:
- name: Download Windows x64
uses: actions/download-artifact@v4
with:
name: extension-x64-windows
path: .
- name: Download Linux x64
uses: actions/download-artifact@v4
with:
name: extension-x64-linux
path: .
- name: VirusTotal Scan
uses: crazy-max/ghaction-virustotal@v4
with:
vt_api_key: ${{ secrets.VIRUSTOTAL_APIKEY }}
request_rate: 4
files: |
./dynops_x64.dll
./dynops_x64.so
pre-release:
needs: [build]
if: needs.check.outputs.last_sha != github.sha && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
name: Publish pre-release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download Addon
uses: actions/download-artifact@v4
with:
name: addon
path: .
- name: Push pre-release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development build"
files: dynops-latest.zip