Skip to content

Commit

Permalink
Updates image name, and uses spago@next
Browse files Browse the repository at this point in the history
  • Loading branch information
onslaughtq committed Nov 1, 2023
1 parent 43949f1 commit 970e0f1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 124 deletions.
66 changes: 24 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,36 @@ defaults:
shell: bash

jobs:
build_and_push_image:
strategy:
matrix:
os: [[self-hosted, linux, x64], [self-hosted, linux, arm64]]

runs-on: ${{ matrix.os }}
name: Build and Push Docker Image

build:
name: Build and push purescript-tools
runs-on: [self-hosted, linux, x64]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Log in to the Github Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker buildx
uses: docker/setup-buildx-action@v2

- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v2
uses: docker/setup-buildx-action@v3

- name: Build And Push Image
run: |
./build-image.sh build-and-push-arch-tag
build_and_push_manifest:
name: Build manifest docker image
runs-on: [self-hosted, linux, x64]
needs: [build_and_push_image]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Github Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push manifest
run: |
./build-image.sh push-manifest
images: |
ghcr.io/exfreight-zeta/purescript-tools
tags: |
type=sha,format=short,prefix=
type=raw,value=latest,enable={{is_default_branch}}
- name: Build, tag, and push image to GCR
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha,mode=max,ignore-error=true
cache-to: type=gha,mode=max,ignore-error=true
platforms: "linux/amd64", "linux/arm64"
provenance: false
9 changes: 1 addition & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
FROM ghcr.io/flipstone/haskell-tools:debian-stable-ghc-9.4.7-2023-10-31-3286ef4 AS builder

COPY install-spago.sh /tmp/install-spago.sh
RUN /tmp/install-spago.sh

FROM debian:stable-20230814-slim

ENV LANG="C.UTF-8" LANGUAGE="C.UTF-8" LC_ALL="C.UTF-8"

COPY --from=builder /root/.local/bin/spago /usr/local/bin/spago

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y -qq --no-install-recommends \
Expand All @@ -25,4 +18,4 @@ RUN apt-get update && \
apt-get clean

RUN npm install -g [email protected]
RUN npm install -g [email protected] [email protected] [email protected] [email protected]
RUN npm install -g spago@next [email protected] [email protected] [email protected] [email protected]
63 changes: 0 additions & 63 deletions build-image.sh

This file was deleted.

11 changes: 0 additions & 11 deletions install-spago.sh

This file was deleted.

0 comments on commit 970e0f1

Please sign in to comment.