on master help sign in
add GH workflow action to create the build image

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

commitceaa6825ab60464a0887a7731f3caf6328b6ea32 authorJens Petersen <juhpetersen@gmail.com> dateThu 17 Jun 2021, 22:17 (5 years ago) parente6e96bc
1 file changed+25
.github/workflows/image.yml+25
.github/workflows/image.ymlnew file+25
@@ -0,0 +1,25 @@
1+name: image
2+
3+on:
4+ push:
5+ branches:
6+ - nightly
7+ - lts18
8+
9+jobs:
10+ push:
11+ runs-on: ubuntu-latest
12+ if: github.event_name == 'push'
13+
14+ steps:
15+ - uses: actions/checkout@v2
16+
17+ - name: Log into Github registry
18+ run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
19+
20+ - name: Build image
21+ run: |
22+ IMAGE_ID=docker.pkg.github.com/${{ github.repository }}:${{ github.branch }}
23+ docker build . -f Dockerfile --tag $IMAGE_ID
24+ docker push $IMAGE_ID
25+ echo Pushed new build image $IMAGE_ID