-
Notifications
You must be signed in to change notification settings - Fork 26
54 lines (42 loc) · 1.36 KB
/
docker-tag-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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
name: Docker Tagged Release
on:
push:
tags:
- '*'
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_ID }}
password: ${{ secrets.DOCKER_PSK }}
- uses: actions/checkout@v2
- name: Shrink README
run: grep -n Compatibility README.md | tail -1 | cut -d":" -f1 | xargs -I{} head -n{} README.md | head -n-1 > README-DOCKER.md
- name: Set current tag
id: current_tag
run: echo "::set-output name=CURRENT_TAG::${GITHUB_REF##*/}"
- name: Docker Hub Description
uses: peter-evans/[email protected]
with:
username: ${{ secrets.DOCKER_ID }}
password: ${{ secrets.DOCKER_PSK }}
repository: 89luca89/terrible
readme-filepath: ./README-DOCKER.md
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
file: ./Dockerfile
push: true
tags: |
89luca89/terrible:${{ steps.current_tag.outputs.CURRENT_TAG }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}