Build ISO Image (self-hosted storage) #14
Workflow file for this run
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: Build ISO Image (self-hosted storage) | |
# Avoids having multiple instances running | |
concurrency: | |
group: build-iso | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and push image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: 512 | |
swap-size-mb: 1024 | |
remove-dotnet: 'true' | |
remove-codeql: 'true' | |
remove-haskell: 'true' | |
remove-android: 'true' | |
- name: Check free space | |
run: echo "Free space $(df -h /)" | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Write authorized_keys | |
run: echo $CONTENT | base64 -d > $FILENAME | |
env: | |
CONTENT: ${{ secrets.AUTHORIZED_KEYS }} | |
FILENAME: image-toolkit/misc/authorized_keys | |
- name: Write config.local.sh | |
run: echo $CONTENT | base64 -d > $FILENAME | |
env: | |
CONTENT: ${{ secrets.CONFIG_LOCAL_SH }} | |
FILENAME: config.local.sh | |
- name: Write image-toolkit/config.sh | |
run: echo $CONTENT | base64 -d > $FILENAME | |
env: | |
CONTENT: ${{ secrets.TOOLKIT_CONFIG_SH }} | |
FILENAME: image-toolkit/config.sh | |
- name: Build image | |
run: sudo ./build.sh icpc_build --github-actions | |
# - name: Push to Server | |
# uses: appleboy/[email protected] | |
# with: | |
# host: ${{ secrets.SCP_HOST }} | |
# username: ${{ secrets.SCP_USERNAME }} | |
# key: ${{ secrets.SCP_KEY }} | |
# port: ${{ secrets.SCP_PORT }} | |
# source: live-build/contestant.iso | |
# target: ${{ secrets.SCP_TARGET }} | |
# tar_tmp_path: live-build/ | |
- name: Push to Server | |
uses: nogsantos/scp-deploy@master | |
with: | |
src: live-build/contestant.iso | |
host: ${{ secrets.SCP_HOST }} | |
remote: ${{ secrets.SCP_TARGET }} | |
port: ${{ secrets.SCP_PORT }} | |
user: ${{ secrets.SCP_USERNAME }} | |
key: ${{ secrets.SCP_KEY }} |