-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manual workflow to fetch a release and check the version
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This is a basic workflow that is manually triggered | ||
|
||
name: Version workflow | ||
|
||
# Controls when the action will run. Workflow runs when manually triggered using the UI | ||
# or API. | ||
on: | ||
workflow_dispatch: | ||
# Inputs the workflow accepts. | ||
inputs: | ||
release: | ||
# Friendly description to be shown in the UI instead of 'release' | ||
description: 'Release to test' | ||
# Default value if no value is explicitly provided | ||
default: '4.0.1' | ||
# Input has to be provided for the workflow to run | ||
required: true | ||
# The data type of the input | ||
type: string | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "greet" | ||
version: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt' | ||
cache: maven | ||
# Runs a series of commands using the runners shell | ||
- name: Send greeting | ||
run: | | ||
wget "https://github.com/jagornet/dhcp/releases/download/${{ inputs.release }}/jagornet-dhcp-dist-${{ inputs.release }}-all.tar.gz" | ||
tar xvf "jagornet-dhcp-dist${{ inputs.release }}-all.tar.gz" | ||
"jagornet-dhcp-dist${{ inputs.release }}/bin/dhcpserver" version 2>&1 |grep "${{ inputs.release}}" | ||