Brew formula update for stackgen-cli version v0.71.1 #67
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
| # a pipeline to create container image on changes to stackgen.rb file | |
| name: stackgen | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'stackgen.rb' | |
| - stackgen/Dockerfile | |
| - .github/workflows/stackgen.yaml | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: stackgenhq/stackgen | |
| jobs: | |
| build: | |
| outputs: | |
| image_tag: ${{ steps.meta.outputs.tags }} | |
| version: ${{ steps.version.outputs.VERSION }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: linux/amd64 | |
| runner: ubuntu-latest | |
| tag-suffix: -amd | |
| - platform: linux/arm64 | |
| runner: ubuntu-22.04-arm | |
| tag-suffix: -arm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| sparse-checkout: | | |
| stackgen | |
| stackgen.rb | |
| - name: Get stackgen version | |
| id: version | |
| run: | | |
| echo "VERSION=$(grep 'version' stackgen.rb | awk '{print $NF}' | tr -d '"')" >> $GITHUB_OUTPUT | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=raw,value=${{ steps.version.outputs.VERSION }} | |
| type=raw,value=latest | |
| flavor: | | |
| suffix=${{ matrix.tag-suffix }},onlatest=false | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Docker Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./stackgen | |
| platforms: ${{ matrix.platform }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| push: true | |
| provenance: false | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: |- | |
| STACKGEN_VERSION=${{ steps.version.outputs.VERSION }} | |
| create_manifest: | |
| name: Create manifest | |
| runs-on: ubuntu-22.04 | |
| needs: build | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create manifest | |
| run: | | |
| docker buildx imagetools create \ | |
| -t ghcr.io/stackgenhq/stackgen:latest \ | |
| ghcr.io/stackgenhq/stackgen:latest-amd \ | |
| ghcr.io/stackgenhq/stackgen:latest-arm | |
| docker buildx imagetools create \ | |
| -t ghcr.io/stackgenhq/stackgen:${{ needs.build.outputs.version }} \ | |
| ghcr.io/stackgenhq/stackgen:${{ needs.build.outputs.version }}-amd \ | |
| ghcr.io/stackgenhq/stackgen:${{ needs.build.outputs.version }}-arm | |