forked from benc-uk/python-demoapp
-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (23 loc) · 722 Bytes
/
Copy pathpublish.yaml
File metadata and controls
28 lines (23 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Release Versioned Image
on:
release:
types: [published]
env:
IMAGE_REG: ghcr.io
IMAGE_REPO: benc-uk/python-demoapp
jobs:
publish-image:
name: "Build & Publish"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Docker build image with version tag"
run: |
make image IMAGE_TAG=${{ github.event.release.tag_name }}
make image IMAGE_TAG=latest
- name: "Push to container registry"
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login $IMAGE_REG -u $GITHUB_ACTOR --password-stdin
make push IMAGE_TAG=${{ github.event.release.tag_name }}
make push IMAGE_TAG=latest