Build HomeSeer Docker Image #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build HomeSeer Docker Image | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| hs_version: | |
| description: "HomeSeer version (e.g. 4.2.23.0)" | |
| required: true | |
| type: string | |
| channel: | |
| description: "Release channel" | |
| required: true | |
| type: choice | |
| options: | |
| - release | |
| - beta | |
| default: release | |
| mode: | |
| description: "Build mode" | |
| required: true | |
| type: choice | |
| options: | |
| - push | |
| - load | |
| default: push | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Lowercase repository owner | |
| run: echo "OWNER_LC=${OWNER,,}" >> $GITHUB_ENV | |
| env: | |
| OWNER: ${{ github.repository_owner }} | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build HomeSeer image | |
| env: | |
| HS_VERSION: ${{ inputs.hs_version }} | |
| BUILD_MODE: ${{ inputs.mode }} | |
| CHANNEL: ${{ inputs.channel }} | |
| IMAGE_NAME: ghcr.io/${{ env.OWNER_LC }}/homeseer | |
| run: | | |
| chmod +x build.sh | |
| echo "Building HomeSeer $HS_VERSION ($CHANNEL) in $BUILD_MODE mode" | |
| ./build.sh --mode "$BUILD_MODE" --channel "$CHANNEL" |