Skip to content

Check Update Alpine BaseOS Container -riscv64 #1

Check Update Alpine BaseOS Container -riscv64

Check Update Alpine BaseOS Container -riscv64 #1

name: Check Update Alpine BaseOS Container -riscv64
on:
#schedule:
#- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
check_version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: ➡️ Get Alpine version from URL
run: |
URL_BASE="https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/riscv64/"
FILE=$(curl -s $URL_BASE | grep -oP 'alpine-minirootfs-[0-9]{1}.[0-9]{2}.[0-9]{1}')
FULL_URL="${URL_BASE}${FILE}"
LAST_VERSION=$(echo $FULL_URL | grep -oP '([0-9]{1}\.[0-9]{2}\.[0-9]{1})' | tail -n 1)
echo $LAST_VERSION >> alpine/riscv64/last_version.txt
- name: ✔️ Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "💫Update (Alpine BaseOS Container $LAST_VERSION-riscv64)"
git push