mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-11 23:08:30 +01:00
Based on https://github.com/fpco/stackage-server/blob/master/.github/workflows/base.yml Image is pushed to docker.pkg.github.com. Later we should switch from docker to current beta container registry ghcr.io
26 lines
622 B
YAML
26 lines
622 B
YAML
name: image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- nightly
|
|
- lts18
|
|
|
|
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 image
|
|
run: |
|
|
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}:${{ github.branch }}
|
|
docker build . -f Dockerfile --tag $IMAGE_ID
|
|
docker push $IMAGE_ID
|
|
echo Pushed new build image $IMAGE_ID
|