update zola version
This commit is contained in:
parent
a615780b69
commit
ad28b73245
@ -7,4 +7,5 @@ This action sets up Zola static site generator in your GitHub Actions workflow.
|
|||||||
```yaml
|
```yaml
|
||||||
uses: my-org/setup-zola@v1
|
uses: my-org/setup-zola@v1
|
||||||
with:
|
with:
|
||||||
version: '0.18.0' # Optional
|
version: "0.19.2" # Optional
|
||||||
|
```
|
||||||
|
@ -9,6 +9,7 @@ runs:
|
|||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Run install script
|
- name: Run install script
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
chmod +x ${{ github.action_path }}/scripts/install_zola.sh
|
chmod +x ${{ github.action_path }}/scripts/install_zola.sh
|
||||||
${{ github.action_path }}/scripts/install_zola.sh ${{ inputs.version }}
|
${{ github.action_path }}/scripts/install_zola.sh ${{ inputs.version }}
|
||||||
|
@ -2,10 +2,20 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
ZOLA_VERSION="0.18.0"
|
ZOLA_VERSION="0.19.2"
|
||||||
|
|
||||||
|
BASE_URL="https://git.mamahaha.work/api/packages/actions/generic/zola"
|
||||||
|
echo "Checking Zola version $ZOLA_VERSION..."
|
||||||
|
|
||||||
|
# 使用 -I 只获取头信息,-s 静默模式
|
||||||
|
if ! curl -Is "${BASE_URL}/${ZOLA_VERSION}/zola" | grep -q "200 OK"; then
|
||||||
|
echo "Error: Version $ZOLA_VERSION not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Downloading Zola version $ZOLA_VERSION..."
|
echo "Downloading Zola version $ZOLA_VERSION..."
|
||||||
wget https://minio.mamahaha.work/mybucket/zola-$ZOLA_VERSION -q -O zola
|
curl -OJ "${BASE_URL}/${ZOLA_VERSION}/zola"
|
||||||
|
|
||||||
chmod +x zola
|
chmod +x zola
|
||||||
sudo mv zola /usr/local/bin
|
sudo mv zola /usr/local/bin
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user