Minor fixes and improvements (#129) #95
Workflow file for this run
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: release-pipeline | |
| on: | |
| push: | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| permissions: | |
| contents: write | |
| env: | |
| GOPATH: /data/cache/go | |
| GOMODCACHE: /data/cache/go/pkg/mod | |
| GOTOOLCHAIN: "" | |
| PNPM_HOME: /data/cache/pnpm | |
| BUILDKIT_CACHE: /data/cache/docker | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.26.3 | |
| - name: Install nfpm | |
| run: | | |
| echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list | |
| sudo apt update | |
| sudo apt install -y nfpm gettext-base | |
| - uses: docker/setup-qemu-action@v4 | |
| - uses: docker/setup-buildx-action@v4 | |
| with: | |
| driver: docker-container | |
| driver-opts: | | |
| image=moby/buildkit:master | |
| network=host | |
| platforms: linux/amd64,linux/arm64 | |
| - uses: docker/login-action@v4 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - uses: docker/login-action@v4 | |
| with: | |
| registry: docker.lan.dillmann.dev | |
| username: ${{ secrets.PRIVATE_DOCKER_USERNAME }} | |
| password: ${{ secrets.PRIVATE_DOCKER_PASSWORD }} | |
| - name: Resolve version number from tag | |
| id: tag | |
| run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT | |
| - name: Build and release | |
| run: make build-release VERSION=${{ steps.tag.outputs.VERSION }} | |
| - name: Resolve Docker image hash | |
| id: docker | |
| run: | | |
| RAW_DIGEST=$(docker buildx imagetools inspect dillmann/nginx-ignition:${{ steps.tag.outputs.VERSION }} --format '{{json .}}' | jq -r '.manifest.manifests[0].digest') | |
| echo "DOCKER_IMAGE_HASH=$(echo $RAW_DIGEST | sed 's/:/-/g')" >> $GITHUB_OUTPUT | |
| - name: Create draft release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./.github/scripts/update-release.sh "${{ steps.docker.outputs.DOCKER_IMAGE_HASH }}" "false" "${{ steps.tag.outputs.VERSION }}" "true" | |
| - name: Upload distribution files | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ steps.tag.outputs.VERSION }} | |
| draft: true | |
| files: | | |
| build/nginx-ignition*.zip | |
| build/nginx-ignition*.deb | |
| build/nginx-ignition*.rpm | |
| build/nginx-ignition*.apk | |
| build/nginx-ignition*.pkg.tar.zst | |
| build/nginx-ignition*.ipk | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./.github/scripts/update-release.sh "${{ steps.docker.outputs.DOCKER_IMAGE_HASH }}" "false" "${{ steps.tag.outputs.VERSION }}" "false" |