Include image.yml

This commit is contained in:
Michael Snoyman 2021-08-19 11:14:49 +03:00
parent b1d40e1120
commit 6a33935d62
No known key found for this signature in database
GPG Key ID: 907EAE2F42B52046

25
.github/workflows/image.yml vendored Normal file
View File

@ -0,0 +1,25 @@
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 }}/build:${GITHUB_REF#refs/heads/}
docker build . -f Dockerfile --tag $IMAGE_ID
docker push $IMAGE_ID
echo Pushed new build image $IMAGE_ID