Skip to content

Commit

Permalink
Update branches and try to fix up the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sppidy committed Jan 11, 2025
1 parent 2e21f66 commit c07234b
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,51 +20,28 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Docker image
env:
IMAGE_NAME: archlinux_sunnyos
run: |
# Check if the Docker image exists; build if not
if [ -z "$(docker images -q $IMAGE_NAME)" ]; then
echo "Building Docker image: $IMAGE_NAME"
docker build -t $IMAGE_NAME - <<EOF
FROM archlinux:latest
RUN pacman -Sy --noconfirm archiso base-devel git
EOF
else
echo "Docker image $IMAGE_NAME already exists."
fi
- name: Build ISOs for all branches
env:
IMAGE_NAME: archlinux_sunnyos
IMAGE_NAME: archlinux:latest
run: |
# Define the branches and corresponding desktop environments
branches=("sunnyos_gnome" "sunnyos_kde" "sunnyos_xfce")
branches=("sunnyos_gnome" "sunnyos_budgie" "lite_gnome")
# Start the Docker container for building
docker run --rm --privileged \
-v "$GITHUB_WORKSPACE:/work" \
-v "/mnt/temp:/tmp" \
$IMAGE_NAME /bin/bash -c "
pacman -Sy --noconfirm archiso
for branch in ${branches[@]}; do
echo 'Checking out branch: $branch'
git checkout $branch
# Determine the desktop environment based on the branch
case $branch in
sunnyos_gnome) desktop_env='gnome' ;;
sunnyos_kde) desktop_env='kde' ;;
sunnyos_xfce) desktop_env='xfce' ;;
*) desktop_env='default' ;;
esac
echo 'Building ISO with $desktop_env for branch $branch'
pacman -Sy --noconfirm archiso
mkarchiso -v -w /tmp/work -o /tmp/out /work/profiles/$desktop_env
echo 'Building ISO for branch $branch'
mkarchiso -v -w /tmp/work -o /tmp/out /work
# Move the generated ISO to a central location
mv /tmp/out/*.iso /mnt/temp/$branch-$desktop_env-sunnyos.iso
mv /tmp/out/*.iso /mnt/temp/$branch-sunnyos.iso
done
"
Expand All @@ -73,7 +50,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Create the release via GitHub API
release_response=$(curl -XPOST -H "Authorization: token $GITHUB_TOKEN" \
-d '{
"tag_name": "'"${{ github.event.inputs.release_version }}"'",
Expand Down

0 comments on commit c07234b

Please sign in to comment.