chore: update meilisearch, small svelte improvement (#130) #62
This file contains 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 Image | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-amd64: | |
name: amd64 image | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
actions: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
ref: "${{ inputs.ref }}" | |
- name: Login to registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3 | |
- name: Build and push | |
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6 | |
with: | |
push: true | |
provenance: false | |
context: "{{defaultContext}}" | |
tags: "ghcr.io/bradenrayhorn/mise:building-block-amd64-${{ github.sha }}" | |
platforms: linux/amd64 | |
cache-from: type=registry,ref=ghcr.io/bradenrayhorn/mise:buildcache-amd64 | |
cache-to: type=registry,ref=ghcr.io/bradenrayhorn/mise:buildcache-amd64,mode=max | |
build-arm64: | |
name: arm64 image | |
runs-on: [self-hosted, arm64] | |
permissions: | |
packages: write | |
actions: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
ref: "${{ inputs.ref }}" | |
- name: Login to registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3 | |
- name: Build and push | |
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6 | |
with: | |
push: true | |
provenance: false | |
context: "{{defaultContext}}" | |
tags: "ghcr.io/bradenrayhorn/mise:building-block-arm64-${{ github.sha }}" | |
platforms: linux/arm64 | |
cache-from: type=registry,ref=ghcr.io/bradenrayhorn/mise:buildcache-arm64 | |
cache-to: type=registry,ref=ghcr.io/bradenrayhorn/mise:buildcache-arm64,mode=max | |
retag-next: | |
name: Push multiarch image | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
needs: [build-arm64, build-amd64] | |
steps: | |
- name: Login to registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3 | |
- name: Retag | |
run: | | |
IMAGE=ghcr.io/bradenrayhorn/mise | |
docker buildx imagetools create \ | |
--tag $IMAGE:next \ | |
--tag $IMAGE:next-${{ github.sha }} \ | |
$IMAGE:building-block-amd64-${{ github.sha }} \ | |
$IMAGE:building-block-arm64-${{ github.sha }} |