Check Update Alpine BaseOS Container -s390x #7
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
name: Check Update Alpine BaseOS Container -s390x | |
on: | |
#schedule: | |
#- cron: '0 0 * * 0' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
actions: write | |
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/s390x/" | |
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 >> '.github/workflows/alpine/s390x/last_version.txt' | |
- name: ✔️ Commit version file | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: '.github/workflows/alpine/s390x/last_version.txt' | |
message: '💫Update (Alpine BaseOS Container $LAST_VERSION-s390x)' | |
author_name: 'github-actions' | |
author_email: '[email protected]' |