mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-12-26 23:02:15 -05:00
17 lines
688 B
Bash
Executable file
17 lines
688 B
Bash
Executable file
#!/bin/bash
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
set -e
|
|
|
|
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
|
|
|
|
REPOSITORY="$1"
|
|
VERSION="$2"
|
|
|
|
echo $VERSION > $ROOT_DIR/RUNNER_VERSION
|
|
sed -i -e 's^| runner-version | Runner version |.*^| runner-version | Runner version | `false` | '$VERSION' |^' $ROOT_DIR/README.md
|
|
sed -i -e "/runner-version:/{n;n;s^.*default:.*^ default: '$VERSION'^}" $ROOT_DIR/action.yml
|
|
|
|
echo $REPOSITORY > $ROOT_DIR/RUNNER_REPOSITORY
|
|
sed -i -e 's^| runner | Runner git repository |.*^| runner | Runner git repository | `false` | '$REPOSITORY' |^' $ROOT_DIR/README.md
|
|
sed -i -e "/runner:/{n;n;s^.*default:.*^ default: '$REPOSITORY'^}" $ROOT_DIR/action.yml
|