Skip to content

Commit dfe7243

Browse files
authored
Merge pull request #2 from nomadsec-io/main
Update curl regex to include possible a-z subversions
2 parents f01ae3d + 5a60ec4 commit dfe7243

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/Kali-Linux-to-DigitalOcean.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
- name: Fetch Latest Kali Linux Version
1515
id: fetch_version
1616
run: |
17-
URL=$(curl -s https://kali.download/cloud-images/current/ | grep -oE 'kali-linux-[0-9]+\.[0-9]+-cloud-genericcloud-amd64.tar.xz' | head -n 1)
17+
URL=$(curl -s https://kali.download/cloud-images/current/ | grep -oE 'kali-linux-[0-9]+\.[0-9]+[a-z]?-cloud-genericcloud-amd64.tar.xz' | head -n 1)
1818
FULL_URL="https://kali.download/cloud-images/current/$URL"
19-
KALI_VERSION=$(echo $URL | grep -oE '[0-9]+\.[0-9]+')
19+
KALI_VERSION=$(echo $URL | grep -oE '[0-9]+\.[0-9]+[a-z]?')
2020
echo "KALI_VERSION=$KALI_VERSION" >> $GITHUB_ENV
2121
echo "IMAGE_URL=$FULL_URL" >> $GITHUB_ENV
2222

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ runs:
2222

2323
- name: Fetch Latest Kali Linux Version
2424
run: |
25-
URL=$(curl -s https://kali.download/cloud-images/current/ | grep -oE 'kali-linux-[0-9]+\.[0-9]+-cloud-genericcloud-amd64.tar.xz' | head -n 1)
25+
URL=$(curl -s https://kali.download/cloud-images/current/ | grep -oE 'kali-linux-[0-9]+\.[0-9]+[a-z]?-cloud-genericcloud-amd64.tar.xz' | head -n 1)
2626
FULL_URL="https://kali.download/cloud-images/current/$URL"
27-
KALI_VERSION=$(echo $URL | grep -oE '[0-9]+\.[0-9]+')
27+
KALI_VERSION=$(echo $URL | grep -oE '[0-9]+\.[0-9]+[a-z]?')
2828
echo "KALI_VERSION=$KALI_VERSION" >> $GITHUB_ENV
2929
echo "IMAGE_URL=$FULL_URL" >> $GITHUB_ENV
3030

version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.0.0

0 commit comments

Comments
 (0)