mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-28 16:58:03 +01:00
ci: use environment files in actions (#4338)
This commit is contained in:
parent
a7ae5162e7
commit
4d8776a35c
5 changed files with 25 additions and 35 deletions
10
.github/workflows/amd64-fatpack-image.yml
vendored
10
.github/workflows/amd64-fatpack-image.yml
vendored
|
@ -56,7 +56,6 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set values
|
||||
id: set_values
|
||||
run: |
|
||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||
|
@ -66,19 +65,18 @@ jobs:
|
|||
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "::set-output name=github_user::${{github.event.pull_request.head.repo.owner.login}}"
|
||||
echo "github_user=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "::set-output name=github_user::$(echo ${{github.repository}} | cut -d'/' -f1)"
|
||||
fi
|
||||
echo "github_user=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Display the build name
|
||||
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
||||
|
||||
- name: Run the build script
|
||||
run: |
|
||||
echo "Using the variables: --pack fatpack --github_user ${{steps.set_values.outputs.github_user}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop none"
|
||||
echo "Using the variables: --pack fatpack --github_user $(cat $GITHUB_OUTPUT) --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop none"
|
||||
cd ci/amd64
|
||||
bash packer.build.amd64-debian.sh --pack fatpack --github_user ${{steps.set_values.outputs.github_user}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop none
|
||||
bash packer.build.amd64-debian.sh --pack fatpack --github_user $(cat $GITHUB_OUTPUT) --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop none
|
||||
|
||||
- name: Compute checksum of the raw image
|
||||
run: |
|
||||
|
|
14
.github/workflows/amd64-lean-image.yml
vendored
14
.github/workflows/amd64-lean-image.yml
vendored
|
@ -7,7 +7,7 @@ concurrency:
|
|||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ["dev", "v1.10"]
|
||||
branches: ["dev", "v1.10", "v1.11"]
|
||||
paths:
|
||||
- "build_sdcard.sh"
|
||||
- "home.admin/bitcoin.install.sh"
|
||||
|
@ -34,7 +34,6 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set values
|
||||
id: set_values
|
||||
run: |
|
||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||
|
@ -44,19 +43,18 @@ jobs:
|
|||
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "::set-output name=github_user::${{github.event.pull_request.head.repo.owner.login}}"
|
||||
echo "github_user=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "::set-output name=github_user::$(echo ${{github.repository}} | cut -d'/' -f1)"
|
||||
fi
|
||||
echo "github_user=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Display the build name
|
||||
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
||||
|
||||
- name: Run the build script
|
||||
run: |
|
||||
echo "Using the variables: --pack lean --github_user ${{steps.set_values.outputs.github_user}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop gnome"
|
||||
echo "Using the variables: --pack lean --github_user $(cat $GITHUB_OUTPUT) --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop gnome"
|
||||
cd ci/amd64
|
||||
bash packer.build.amd64-debian.sh --pack lean --github_user ${{steps.set_values.outputs.github_user}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop gnome
|
||||
bash packer.build.amd64-debian.sh --pack lean --github_user $(cat $GITHUB_OUTPUT) --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop gnome
|
||||
|
||||
- name: Compute checksum of the raw image
|
||||
run: |
|
||||
|
@ -80,4 +78,4 @@ jobs:
|
|||
path: |
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.sha256
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.gz
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.gz.sha256
|
||||
${{github.workspace}}/
|
||||
|
|
|
@ -7,7 +7,7 @@ concurrency:
|
|||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ["dev", "v1.10"]
|
||||
branches: ["dev", "v1.10", "v1.11"]
|
||||
paths:
|
||||
- "build_sdcard.sh"
|
||||
- "home.admin/bitcoin.install.sh"
|
||||
|
@ -34,7 +34,6 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set values
|
||||
id: set_values
|
||||
run: |
|
||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||
|
@ -44,19 +43,18 @@ jobs:
|
|||
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "::set-output name=github_user::${{github.event.pull_request.head.repo.owner.login}}"
|
||||
echo "github_user=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "::set-output name=github_user::$(echo ${{github.repository}} | cut -d'/' -f1)"
|
||||
fi
|
||||
echo "github_user=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Display the build name
|
||||
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
||||
|
||||
- name: Run the build script
|
||||
run: |
|
||||
echo "Using the variables: --pack lean --github_user ${{steps.set_values.outputs.github_user}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot bios --desktop none"
|
||||
echo "Using the variables: --pack lean --github_user $(cat $GITHUB_OUTPUT) --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot bios --desktop none"
|
||||
cd ci/amd64
|
||||
bash packer.build.amd64-debian.sh --pack lean --github_user ${{steps.set_values.outputs.github_user}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot bios --desktop none
|
||||
bash packer.build.amd64-debian.sh --pack lean --github_user $(cat $GITHUB_OUTPUT) --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot bios --desktop none
|
||||
|
||||
- name: Compute checksum of the raw image
|
||||
run: |
|
||||
|
@ -80,4 +78,4 @@ jobs:
|
|||
path: |
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.sha256
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.gz
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.gz.sha256
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd
|
||||
|
|
10
.github/workflows/arm64-rpi-fatpack-image.yml
vendored
10
.github/workflows/arm64-rpi-fatpack-image.yml
vendored
|
@ -56,7 +56,6 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set values
|
||||
id: set_values
|
||||
run: |
|
||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||
|
@ -66,19 +65,18 @@ jobs:
|
|||
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "::set-output name=github_user::${{github.event.pull_request.head.repo.owner.login}}"
|
||||
echo "github_user=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "::set-output name=github_user::$(echo ${{github.repository}} | cut -d'/' -f1)"
|
||||
fi
|
||||
echo "github_user=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Display the build name
|
||||
run: echo "Building the raspiblitz-arm64-rpi-fatpack-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
||||
|
||||
- name: Run the build script
|
||||
run: |
|
||||
echo "Using the variables: --pack fatpack --github_user ${{steps.set_values.outputs.github_user}} --branch ${{env.BRANCH_NAME}}"
|
||||
echo "Using the variables: --pack fatpack --github_user $(cat $GITHUB_OUTPUT) --branch ${{env.BRANCH_NAME}}"
|
||||
cd ci/arm64-rpi
|
||||
bash packer.build.arm64-rpi.sh --pack fatpack --github_user ${{steps.set_values.outputs.github_user}} --branch ${{env.BRANCH_NAME}}
|
||||
bash packer.build.arm64-rpi.sh --pack fatpack --github_user $(cat $GITHUB_OUTPUT) --branch ${{env.BRANCH_NAME}}
|
||||
|
||||
- name: Compute checksum of the raw image
|
||||
run: |
|
||||
|
|
12
.github/workflows/arm64-rpi-lean-image.yml
vendored
12
.github/workflows/arm64-rpi-lean-image.yml
vendored
|
@ -7,7 +7,7 @@ concurrency:
|
|||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ["dev", "v1.10"]
|
||||
branches: ["dev", "v1.10", "v1.11"]
|
||||
paths:
|
||||
- "build_sdcard.sh"
|
||||
- "home.admin/bitcoin.install.sh"
|
||||
|
@ -34,7 +34,6 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set values
|
||||
id: set_values
|
||||
run: |
|
||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||
|
@ -44,19 +43,18 @@ jobs:
|
|||
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "::set-output name=github_user::${{github.event.pull_request.head.repo.owner.login}}"
|
||||
echo "github_user=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "::set-output name=github_user::$(echo ${{github.repository}} | cut -d'/' -f1)"
|
||||
fi
|
||||
echo "github_user=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Display the build name
|
||||
run: echo "Building the raspiblitz-arm64-rpi-lean-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}"
|
||||
|
||||
- name: Run the build script
|
||||
run: |
|
||||
echo "Using the variables: --pack lean --github_user ${{steps.set_values.outputs.github_user}} --branch ${{env.BRANCH_NAME}}"
|
||||
echo "Using the variables: --pack lean --github_user $(cat $GITHUB_OUTPUT) --branch ${{env.BRANCH_NAME}}"
|
||||
cd ci/arm64-rpi
|
||||
bash packer.build.arm64-rpi.sh --pack lean --github_user ${{steps.set_values.outputs.github_user}} --branch ${{env.BRANCH_NAME}}
|
||||
bash packer.build.arm64-rpi.sh --pack lean --github_user $(cat $GITHUB_OUTPUT) --branch ${{env.BRANCH_NAME}}
|
||||
|
||||
- name: Compute checksum of the raw image
|
||||
run: |
|
||||
|
|
Loading…
Add table
Reference in a new issue