Skip to content

Commit

Permalink
fix: move variables from action to searated file
Browse files Browse the repository at this point in the history
  • Loading branch information
valerius committed Feb 22, 2024
1 parent 87cb6a2 commit 3cb54fb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/rpi_aarch64_image_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,34 @@ jobs:
env:
INSTALL_REQUIREMENTS: false
LOOP_IMAGE_SIZE: 4G
IMAGE_NAME_PREFIX: sz-arch
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
TRANSFERSH_URL: ${{ secrets.TRANSFERSH_URL }}
RPI_MODEL: 5
ARM_VERSION: aarch64
DEFAULT_LOCALE: en_US.UTF-8
TIMEZONE: Europe/Paris
KEYMAP: us-acentos
SSH_PUB_KEY: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKMidTQ6KGfZtonNKd1HtNPPDiPtzEmlg5yOduvmZzTA valerius laptop
PACKAGES: arp-scan base-devel dosfstools git mkinitcpio-utils neovim nftables openssh python qrencode rsync sudo tailscale uboot-tools unzip zerotier-one zsh

# IMAGE_NAME_PREFIX: sz-arch
# RPI_MODEL: 5
# DEFAULT_LOCALE: en_US.UTF-8
# TIMEZONE: Europe/Paris
# KEYMAP: us-acentos
# SSH_PUB_KEY: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKMidTQ6KGfZtonNKd1HtNPPDiPtzEmlg5yOduvmZzTA valerius laptop
# PACKAGES: arp-scan base-devel dosfstools git mkinitcpio-utils neovim nftables openssh python qrencode rsync sudo tailscale uboot-tools unzip zerotier-one zsh
runs-on: self-hosted
environment: main
# container: archlinux:latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Load Environment Variables
run: |
set -a
source build_config.env
set +a
while IFS= read -r line; do
if [[ "$line" =~ ^[[:alnum:]_]+=.+ ]]; then
echo "$line" >> $GITHUB_ENV
fi
done < build_config.env
- name: Generate Dynamic Variables
run: |
echo "RPI_HOSTNAME=sz-$(git rev-parse --short HEAD)-rpi${{ env.RPI_MODEL }}" >> $GITHUB_ENV
Expand Down
3 changes: 0 additions & 3 deletions build_archlinux_rpi_aarch64_img.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ ICAgIHxfX18vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAK" | base64 -d

source ./build_config.env

printenv
echo "here is the workdir - $WORKDIR_BASE"

echo "Setting locale and keymap..."
# Add locales to /etc/locale.gen within the chroot environment
arch-chroot $WORKDIR_BASE/root sed -i -e '/^#en_US.UTF-8 UTF-8/s/^#//' \
Expand Down
1 change: 1 addition & 0 deletions build_config.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

# Build configuration
IMAGE_NAME_PREFIX="sz-arch"
DEFAULT_LOCALE="en_US.UTF-8"
KEYMAP="us-accentos"
TIMEZONE="Euripe/Paris"
Expand Down

0 comments on commit 3cb54fb

Please sign in to comment.