arm-images

Just a repo building lots of arm images for myself since apparently it all sucks currently
git clone git://archive.git.mtrnord.blog/MTRNord/arm-images.git
Log | Files | Refs | Submodules

build_chatwoot.yaml (2343B)


      1 name: Publish Chatwoot Docker image
      2 
      3 on:
      4   push:
      5     branches:
      6       - "main"
      7     paths:
      8       - "chatwoot/**"
      9       - ".github/workflows/build_chatwoot.yaml"
     10   workflow_dispatch:
     11 
     12 jobs:
     13   push_to_registries:
     14     permissions:
     15       contents: read
     16       packages: write
     17       id-token: write
     18     name: Push chatwoot image to repo
     19     runs-on: ARM64
     20     steps:
     21       - name: Check out the repo
     22         uses: actions/checkout@v3
     23         with:
     24           submodules: "recursive"
     25 
     26       - name: Log in to Docker Hub
     27         uses: docker/login-action@v2
     28         with:
     29           registry: coreharbor.kubernetes.midnightthoughts.space
     30           username: ${{ secrets.DOCKER_USERNAME }}
     31           password: ${{ secrets.DOCKER_PASSWORD }}
     32 
     33       - name: Install Cosign
     34         uses: sigstore/cosign-installer@v3
     35       - name: Set up QEMU
     36         uses: docker/setup-qemu-action@v2
     37       - name: Set up Docker Buildx
     38         uses: docker/setup-buildx-action@v2
     39 
     40       - name: Docker meta
     41         id: docker_meta
     42         uses: docker/metadata-action@v4
     43         with:
     44           images: coreharbor.kubernetes.midnightthoughts.space/chatwoot/chatwoot
     45           tags: type=sha,format=long
     46 
     47       - name: Strip enterprise code
     48         run: |
     49           rm -rf chatwoot/enterprise
     50           rm -rf chatwoot/spec/enterprise
     51 
     52       - name: Set Chatwoot edition
     53         run: |
     54           echo -en '\nENV CW_EDITION="ce"' >> chatwoot/docker/Dockerfile
     55 
     56       - name: Fix Dockerfile
     57         run: |
     58           grep -v "RUN git rev-parse HEAD > /app/.git_sha" chatwoot/docker/Dockerfile > tmpfile && mv tmpfile chatwoot/docker/Dockerfile
     59           grep -v "COPY --from=pre-builder /app/.git_sha /app/.git_sha" chatwoot/docker/Dockerfile > tmpfile && mv tmpfile chatwoot/docker/Dockerfile
     60 
     61       - name: Build and push
     62         id: build_and_push
     63         uses: docker/build-push-action@v4
     64         with:
     65           push: true
     66           context: chatwoot
     67           file: chatwoot/docker/Dockerfile
     68           sbom: true
     69           provenance: true
     70           platforms: linux/amd64,linux/arm64
     71           tags: ${{ steps.docker_meta.outputs.tags }}
     72 
     73       - name: Sign the images with GitHub OIDC Token
     74         env:
     75           DIGEST: ${{ steps.build_and_push.outputs.digest }}
     76           TAGS: ${{ steps.docker_meta.outputs.tags }}
     77         run: cosign sign --yes "${TAGS}@${DIGEST}"