Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ on:

env:
DOCKER_REPO: ${{ vars.DOCKER_USERNAME }}/clonezilla
URL: https://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/3.2.1-28/clonezilla-live-3.2.1-28-amd64.iso
UPLOAD_LATEST: true

jobs:
build_and_deploy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3

- name: Read config from build.env
run: |
cat build.env >> $GITHUB_ENV

- name: Build Docker Container
run: |
TMPDIR=$(mktemp -d)
sudo ./src/main/scripts/build.sh --dir=${TMPDIR} --url=${URL} --docker-repo=${DOCKER_REPO}
sudo ./src/main/scripts/build.sh --dir=${TMPDIR} --url=${{ env.URL }} --docker-repo=${DOCKER_REPO}

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
Expand All @@ -32,6 +34,6 @@ jobs:
shell: bash
run: |
docker images
[ "${UPLOAD_LATEST}" = false ] && docker rmi ${DOCKER_REPO}:latest
[ "${{ env.UPLOAD_LATEST }}" = false ] && docker rmi ${DOCKER_REPO}:latest
docker push ${DOCKER_REPO} --all-tags
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
9 changes: 6 additions & 3 deletions .github/workflows/manual-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@ jobs:
VERSION=$(basename "${{ github.event.inputs.url }}" | sed -e 's/clonezilla-live-//' -e 's/-amd64.iso//')
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT

- name: Update ci-cd.yml
- name: Update configuration file
run: |
sed -i 's| URL:.*| URL: ${{ github.event.inputs.url }}|' .github/workflows/ci-cd.yml
sed -i 's|^URL=.*|URL=${{ github.event.inputs.url }}|' build.env

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update Clonezilla to ${{ steps.parse_version.outputs.VERSION }}"
title: "Update to Clonezilla ${{ steps.parse_version.outputs.VERSION }}"
body: "This PR updates the Clonezilla version to `${{ steps.parse_version.outputs.VERSION }}`."
body: |
This PR updates the Clonezilla version to `${{ steps.parse_version.outputs.VERSION }}`.

The `build.env` configuration file has been updated.
branch: "feat/clonezilla-${{ steps.parse_version.outputs.VERSION }}"
base: main
2 changes: 2 additions & 0 deletions build.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
URL=https://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/3.2.1-28/clonezilla-live-3.2.1-28-amd64.iso
UPLOAD_LATEST=true
Loading