Skip to content

Commit

Permalink
Base workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Apr 16, 2020
1 parent 355a86e commit 9538a91
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 17 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/Dockerfile.base-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM fpco/pid1:18.04

ENV LANG C.UTF-8
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install curl -y && \
curl -sSL https://get.haskellstack.org/ | sh && \
unset DEBIAN_FRONTEND
RUN stack update
COPY stack.yaml package.yaml /src/
RUN stack setup --stack-yaml /src/stack.yaml
RUN stack build --only-snapshot --stack-yaml /src/stack.yaml
9 changes: 9 additions & 0 deletions .github/workflows/Dockerfile.base-run
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM fpco/pid1:18.04

RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
wget -qO- https://get.haskellstack.org/ | sh -x && \
apt-get install -y \
ca-certificates \
libgmp-dev \
netbase
30 changes: 30 additions & 0 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Base image

on:
push:
branches: [base]

jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v2

- name: Log into Github registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin

- name: Build base run image
run: |
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/base-run:$GITHUB_SHA
docker build . -f .github/workflows/Dockerfile.base-run --tag $IMAGE_ID
docker push $IMAGE_ID
echo Pushed new base image $IMAGE_ID
- name: Build base build image
run: |
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/base-build:$GITHUB_SHA
docker build . -f .github/workflows/Dockerfile.base-build --tag $IMAGE_ID
docker push $IMAGE_ID
echo Pushed new base build image $IMAGE_ID
17 changes: 0 additions & 17 deletions azure-pipelines.yml

This file was deleted.

0 comments on commit 9538a91

Please sign in to comment.