build: update Dockerfile to use Ubuntu 24.10 and adjust Docker packag… #12
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: "dev-toolkit" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| release_tag: | |
| description: "release tag e.g. 2025.01" | |
| required: true | |
| push: | |
| tags: | |
| - '*' | |
| env: | |
| DOCKER_HUB_REPO: portainer/dev-toolkit | |
| IMAGE_TAG: ${{ github.event_name == 'push' && github.ref_name || inputs.release_tag }} | |
| jobs: | |
| build_images: | |
| strategy: | |
| matrix: | |
| config: | |
| - { platform: linux, arch: amd64 } | |
| - { platform: linux, arch: arm64 } | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "[preparation] checkout" | |
| uses: actions/[email protected] | |
| - name: "[preparation] set up qemu" | |
| uses: docker/[email protected] | |
| - name: "[preparation] set up docker context for buildx" | |
| run: docker context create builders | |
| - name: "[preparation] set up docker buildx" | |
| uses: docker/[email protected] | |
| with: | |
| endpoint: builders | |
| driver-opts: image=moby/buildkit:v0.20.0 | |
| - name: "[preparation] docker login" | |
| uses: docker/[email protected] | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| - name: "build and push image" | |
| uses: docker/[email protected] | |
| with: | |
| platforms: ${{ matrix.config.platform }}/${{ matrix.config.arch }} | |
| tags: ${{ env.DOCKER_HUB_REPO }}:${{ env.IMAGE_TAG }}-${{ matrix.config.platform }}-${{ matrix.config.arch }} | |
| sbom: false | |
| provenance: false | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| outputs: type=registry | |
| build_manifests: | |
| needs: [build_images] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "[preparation] docker login" | |
| uses: docker/[email protected] | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| - name: "create and push multi-arch manifest" | |
| run: | | |
| docker manifest create \ | |
| ${{ env.DOCKER_HUB_REPO }}:${{ env.IMAGE_TAG }} \ | |
| ${{ env.DOCKER_HUB_REPO }}:${{ env.IMAGE_TAG }}-linux-amd64 \ | |
| ${{ env.DOCKER_HUB_REPO }}:${{ env.IMAGE_TAG }}-linux-arm64 | |
| docker manifest push ${{ env.DOCKER_HUB_REPO }}:${{ env.IMAGE_TAG }} |