TestDownload #777
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: TestDownload | |
on: | |
push: | |
branches: | |
- "*" | |
schedule: | |
- cron: "30 23 * * *" | |
jobs: | |
make_sure_download: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Make sure that bedrock_server.sh can download bedrock-server. | |
run: | | |
# bedrock_server.sh をインポートする。 | |
# (環境変数と関数定義のみを実施し、メイン処理は実行しない。) | |
. ./bedrock_server.sh | |
# 事前処理 | |
mkdir -pv "${BASE_DIR}/${BEDROCK_SERVER_DIR}" | |
get_bedrock_server_url | |
# bedrock-server のファイルの URL を取得できているか確認。 | |
test -n $(get_bedrock_server_url) || { echo "Failed: Can not find the bedrock-server URL."; false; } | |
# bedrock-server のファイルをダウンロードできているか確認。 | |
download_bedrock_server_latest_file | |
test -n $(find "${BASE_DIR}/${BEDROCK_SERVER_DIR}" -type f -name "bedrock-server-*.zip") || { echo "Failed: Can not download the bedrock-server."; false; } | |
env: | |
BS_IMPORT: yes | |
I_AGREE_TO_MEULA_AND_PP: yes |