-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move PTAXSIM db file to runner temp dir
- Loading branch information
Showing
3 changed files
with
6 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ runs: | |
id: version_db | ||
run: | | ||
DESCRIPTION_PATH=$(echo "${{ github.workspace }}/DESCRIPTION" | sed 's/\\/\//g') | ||
echo "PTAXSIM_DB_PATH=${{ env.RUNNER_TEMP }}" >> $GITHUB_ENV | ||
echo "PTAXSIM_VERSION=$(sed -n 's/.*Wants_DB_Version: \([0-9]*\.[0-9]*\.[0-9]\).*/\1/p' $DESCRIPTION_PATH)" >> $GITHUB_ENV | ||
echo "PTAXSIM_VERSION=${{ env.PTAXSIM_VERSION }}" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
@@ -30,7 +31,7 @@ runs: | |
uses: actions/[email protected] | ||
id: cache_db | ||
with: | ||
path: ptaxsim.db.bz2 | ||
path: ${{ env.RUNNER_TEMP }}/ptaxsim.db.bz2 | ||
key: ${{ format('{0}-{1}', env.PTAXSIM_VERSION, hashFiles('DESCRIPTION')) }} | ||
enableCrossOsArchive: true | ||
|
||
|
@@ -45,25 +46,25 @@ runs: | |
id: fetch_db | ||
if: steps.cache_db.outputs.cache-hit != 'true' | ||
run: | | ||
aws s3 cp ${{ inputs.PTAXSIM_DB_BASE_URI }}/ptaxsim-${{ env.PTAXSIM_VERSION }}.db.bz2 ptaxsim.db.bz2 --quiet | ||
aws s3 cp ${{ inputs.PTAXSIM_DB_BASE_URI }}/ptaxsim-${{ env.PTAXSIM_VERSION }}.db.bz2 ${{ env.RUNNER_TEMP }}/ptaxsim.db.bz2 --quiet | ||
shell: bash | ||
|
||
- name: Unpack database (Linux) | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get install -y pbzip2 | ||
pbzip2 -dk ${{ github.workspace }}/ptaxsim.db.bz2 | ||
pbzip2 -dk ${{ env.RUNNER_TEMP }}/ptaxsim.db.bz2 | ||
shell: bash | ||
|
||
- name: Unpack database (macOS) | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install pbzip2 | ||
pbzip2 -dk ${{ github.workspace }}/ptaxsim.db.bz2 | ||
pbzip2 -dk ${{ env.RUNNER_TEMP }}/ptaxsim.db.bz2 | ||
shell: bash | ||
|
||
- name: Unpack database (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
7z x ${{ github.workspace }}\ptaxsim.db.bz2 | ||
7z x ${{ env.RUNNER_TEMP }}\ptaxsim.db.bz2 | ||
shell: cmd |
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
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