-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (36 loc) · 980 Bytes
/
release.yml
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
29
30
31
32
33
34
35
36
37
38
name: Release
on:
release:
types:
- published
jobs:
push_to_registry:
name: Push to DockerHub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/[email protected]
with:
images: stanistan/present-me
tags: |
type=semver,pattern=v{{version}}
- name: Build and push Docker image
id: build_push
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION_SHA=${{ github.sha }}
- name: Image digest
run: echo ${{ steps.build_push.outputs.digest }}