45 lines (45 loc) · 1.5 KB
/
publish.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
name: Publish
on:
push:
tags:
- '*'
jobs:
build:
strategy:
matrix:
kind: ['alpine', 'amazonlinux1', 'centos', 'debian', 'ubuntu']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Publish Docker
uses: elgohr/Publish-Docker-Github-Action@2.7
with:
name: "hayd/${{ matrix.kind }}-deno"
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: ${{ matrix.kind }}.dockerfile
cache: true
tags: latest,${{ steps.get_version.outputs.VERSION }}
- name: Publish Docker Legacy
if: matrix.kind != 'amazonlinux1'
uses: elgohr/Publish-Docker-Github-Action@2.7
with:
name: "hayd/deno"
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: ${{ matrix.kind }}.dockerfile
cache: true
tags: ${{ matrix.kind }},${{ matrix.kind }}-${{ steps.get_version.outputs.VERSION }}"
- name: Publish Docker Legacy Alpine
if: matrix.kind == 'alpine'
uses: elgohr/Publish-Docker-Github-Action@2.7
with:
name: "hayd/deno"
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: ${{ matrix.kind }}.dockerfile
cache: true
tags: latest,${{ steps.get_version.outputs.VERSION }}