Skip to content

Commit

Permalink
Create version.yml
Browse files Browse the repository at this point in the history
Manual workflow to fetch a release and check the version
  • Loading branch information
agrabil authored Jan 1, 2025
1 parent d15400c commit fe9f370
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/version.yml
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}}"

0 comments on commit fe9f370

Please sign in to comment.