on reenable help sign in
26 lines 704 B history raw
1name: image
3on:
4 push:
5 branches:
6 - nightly
7 - lts18
9jobs:
10 push:
11 runs-on: ubuntu-latest
12 if: github.event_name == 'push'
14 steps:
15 - uses: actions/checkout@v2
17 - name: Log into Github registry
18 run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
20 - name: Build image
21 run: |
22 IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/build:${GITHUB_REF#refs/heads/}
23 #IMAGE_ID=${{ github.repository }}:${GITHUB_REF#refs/heads/}
24 docker build . -f Dockerfile --tag $IMAGE_ID
25 docker push $IMAGE_ID
26 echo Pushed new build image $IMAGE_ID