mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-28 16:58:03 +01:00
ci: change variables in gh actions to new format (#4045)
* ci: change variables in gh actions to new format * ci: remove quotes and set vars correctly
This commit is contained in:
parent
9bfc8237e0
commit
f58a388cdb
8 changed files with 46 additions and 9 deletions
8
.github/workflows/amd64-fatpack-image.yml
vendored
8
.github/workflows/amd64-fatpack-image.yml
vendored
|
@ -59,14 +59,20 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||||
|
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||||
|
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Hello RaspiBlitz
|
- name: Hello RaspiBlitz
|
||||||
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
||||||
|
|
||||||
- name: Run the build script
|
- name: Run the build script
|
||||||
run: |
|
run: |
|
||||||
|
echo "Using the variables: --pack fatpack --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi--desktop gnome"
|
||||||
cd ci/amd64
|
cd ci/amd64
|
||||||
bash packer.build.amd64-debian.sh --pack fatpack --github_user $GITHUB_ACTOR --branch $GITHUB_HEAD_REF --preseed_file preseed.cfg --boot uefi--desktop gnome
|
bash packer.build.amd64-debian.sh --pack fatpack --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi--desktop gnome
|
||||||
|
|
||||||
- name: Compute checksum of the raw image
|
- name: Compute checksum of the raw image
|
||||||
run: |
|
run: |
|
||||||
|
|
9
.github/workflows/amd64-lean-image.yml
vendored
9
.github/workflows/amd64-lean-image.yml
vendored
|
@ -37,14 +37,19 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||||
|
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||||
|
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
- name: Hello RaspiBlitz
|
- name: Hello RaspiBlitz
|
||||||
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
||||||
|
|
||||||
- name: Run the build script
|
- name: Run the build script
|
||||||
run: |
|
run: |
|
||||||
|
echo "Using the variables: --pack lean --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop gnome"
|
||||||
cd ci/amd64
|
cd ci/amd64
|
||||||
bash packer.build.amd64-debian.sh --pack lean --github_user $GITHUB_ACTOR --branch $GITHUB_HEAD_REF --preseed_file preseed.cfg --boot uefi --desktop gnome
|
bash packer.build.amd64-debian.sh --pack lean --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop gnome
|
||||||
|
|
||||||
- name: Compute checksum of the raw image
|
- name: Compute checksum of the raw image
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -37,14 +37,20 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||||
|
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||||
|
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Hello RaspiBlitz
|
- name: Hello RaspiBlitz
|
||||||
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
||||||
|
|
||||||
- name: Run the build script
|
- name: Run the build script
|
||||||
run: |
|
run: |
|
||||||
|
echo "Using the variables: --pack lean --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot bios --desktop none"
|
||||||
cd ci/amd64
|
cd ci/amd64
|
||||||
bash packer.build.amd64-debian.sh --pack lean --github_user $GITHUB_ACTOR --branch $GITHUB_HEAD_REF --preseed_file preseed.cfg --boot bios --desktop none
|
bash packer.build.amd64-debian.sh --pack lean --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot bios --desktop none
|
||||||
|
|
||||||
- name: Compute checksum of the raw image
|
- name: Compute checksum of the raw image
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -37,14 +37,20 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||||
|
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||||
|
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Hello Raspiblitz
|
- name: Hello Raspiblitz
|
||||||
run: echo "Building the raspiblitz-arm64-rpi-lean-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}"
|
run: echo "Building the raspiblitz-arm64-rpi-lean-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}"
|
||||||
|
|
||||||
- name: Run the build script
|
- name: Run the build script
|
||||||
run: |
|
run: |
|
||||||
|
echo "Using the variables: --pack lean --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}} --image_link https://raspi.debian.net/tested/20230612_raspi_4_bookworm.img.xz --image_checksum a68cd2bfe7831c438d8a5d832803ae0db17afec9f3cd370d9e8748c7b5456283"
|
||||||
cd ci/arm64-rpi
|
cd ci/arm64-rpi
|
||||||
bash packer.build.arm64-rpi.sh "lean" "$GITHUB_ACTOR" "$GITHUB_HEAD_REF" "https://raspi.debian.net/tested/20230612_raspi_4_bookworm.img.xz" "a68cd2bfe7831c438d8a5d832803ae0db17afec9f3cd370d9e8748c7b5456283"
|
bash packer.build.arm64-rpi.sh --pack lean --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}} --image_link https://raspi.debian.net/tested/20230612_raspi_4_bookworm.img.xz --image_checksum a68cd2bfe7831c438d8a5d832803ae0db17afec9f3cd370d9e8748c7b5456283
|
||||||
|
|
||||||
- name: Compute checksum of the raw image
|
- name: Compute checksum of the raw image
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -59,14 +59,20 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||||
|
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||||
|
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Hello Raspiblitz
|
- name: Hello Raspiblitz
|
||||||
run: echo "Building the raspiblitz-arm64-rpi-fatpack-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}"
|
run: echo "Building the raspiblitz-arm64-rpi-fatpack-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}"
|
||||||
|
|
||||||
- name: Run the build script
|
- name: Run the build script
|
||||||
run: |
|
run: |
|
||||||
|
echo "Using the variables: --pack fatpack --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}}"
|
||||||
cd ci/arm64-rpi
|
cd ci/arm64-rpi
|
||||||
bash packer.build.arm64-rpi.sh fatpack $GITHUB_ACTOR $GITHUB_HEAD_REF
|
bash packer.build.arm64-rpi.sh --pack fatpack --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}}
|
||||||
|
|
||||||
- name: Compute checksum of the raw image
|
- name: Compute checksum of the raw image
|
||||||
run: |
|
run: |
|
||||||
|
|
8
.github/workflows/arm64-rpi-lean-image.yml
vendored
8
.github/workflows/arm64-rpi-lean-image.yml
vendored
|
@ -37,14 +37,20 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||||
|
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||||
|
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Hello Raspiblitz
|
- name: Hello Raspiblitz
|
||||||
run: echo "Building the raspiblitz-arm64-rpi-lean-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}"
|
run: echo "Building the raspiblitz-arm64-rpi-lean-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}"
|
||||||
|
|
||||||
- name: Run the build script
|
- name: Run the build script
|
||||||
run: |
|
run: |
|
||||||
|
echo "Using the variables: --pack lean --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}}"
|
||||||
cd ci/arm64-rpi
|
cd ci/arm64-rpi
|
||||||
bash packer.build.arm64-rpi.sh lean $GITHUB_ACTOR $GITHUB_HEAD_REF
|
bash packer.build.arm64-rpi.sh --pack lean --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}}
|
||||||
|
|
||||||
- name: Compute checksum of the raw image
|
- name: Compute checksum of the raw image
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -58,7 +58,8 @@ go mod download
|
||||||
go build || exit 1
|
go build || exit 1
|
||||||
|
|
||||||
# set vars
|
# set vars
|
||||||
source <(../set_variables.sh "$@")
|
source ../set_variables.sh
|
||||||
|
set_variables "$@"
|
||||||
|
|
||||||
cp ../build.arm64-rpi.pkr.hcl ./
|
cp ../build.arm64-rpi.pkr.hcl ./
|
||||||
cp ../build.raspiblitz.sh ./
|
cp ../build.raspiblitz.sh ./
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# set vars
|
# set vars
|
||||||
source <(../set_variables.sh "$@")
|
source ../set_variables.sh
|
||||||
|
set_variables "$@"
|
||||||
|
|
||||||
# build the image in docker
|
# build the image in docker
|
||||||
echo -e "\nBuild the image..."
|
echo -e "\nBuild the image..."
|
||||||
|
|
Loading…
Add table
Reference in a new issue