Brew formula update for genie version v0.1.8-rc.24 #37
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 genie-beta.rb file | |
| name: genie-beta | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'genie-beta.rb' | |
| - genie-beta/Dockerfile | |
| - .github/workflows/genie-beta.yaml | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: stackgenhq/genie-beta | |
| 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: ${{ matrix.runner }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| sparse-checkout: | | |
| genie-beta | |
| genie-beta.rb | |
| - name: Get genie-beta version | |
| id: version | |
| run: | | |
| echo "VERSION=$(grep 'version' genie-beta.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: ./genie-beta | |
| platforms: ${{ matrix.platform }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| push: true | |
| provenance: false | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: |- | |
| GENIE_BETA_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/genie-beta:latest \ | |
| ghcr.io/stackgenhq/genie-beta:latest-amd \ | |
| ghcr.io/stackgenhq/genie-beta:latest-arm | |
| docker buildx imagetools create \ | |
| -t ghcr.io/stackgenhq/genie-beta:${{ needs.build.outputs.version }} \ | |
| ghcr.io/stackgenhq/genie-beta:${{ needs.build.outputs.version }}-amd \ | |
| ghcr.io/stackgenhq/genie-beta:${{ needs.build.outputs.version }}-arm |