-
-
Notifications
You must be signed in to change notification settings - Fork 238
56 lines (48 loc) · 1.69 KB
/
release-docker.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
55
56
name: Release Docker Image
on:
release:
types:
- published
jobs:
release:
name: Docker build and push
runs-on: ubuntu-latest
steps:
- name: Get version without v character
id: version
run: |
VERSION=${{github.event.release.tag_name}}
VERSION_WITHOUT_V=${VERSION:1}
echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT
- name: Set Up QEMU
uses: docker/setup-qemu-action@v2
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# This workflow triggers on GitHub Release, but it may start before the npm package is published.
- name: Sleep for 1s seconds
run: sleep 1s
- name: Build Image
uses: docker/build-push-action@v4
with:
push: true
load: false
build-args: |
ASYNCAPI_GENERATOR_VERSION=${{ steps.version.outputs.value }}
tags: |
asyncapi/generator:${{ steps.version.outputs.value }}
asyncapi/generator:latest
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha
- name: Update Docker Hub Readme
uses: meeDamian/[email protected]
with:
user: ${{ secrets.DOCKER_USERNAME }}
pass: ${{ secrets.DOCKER_PASSWORD }}
slug: asyncapi/generator
description: Use your AsyncAPI definition to generate literally anything. Markdown documentation, Node.js code, HTML documentation, anything!