-
-
Notifications
You must be signed in to change notification settings - Fork 377
112 lines (95 loc) · 3.62 KB
/
Copy pathrelease-docker.yml
File metadata and controls
112 lines (95 loc) · 3.62 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Release Docker Image
on:
release:
types:
- published
jobs:
publish-docker:
name: Generating Docker
runs-on: ubuntu-latest
steps:
- name: Get version without v character
id: version
env:
TAG_NAME: ${{ github.event.release.tag_name }}
run: |
VERSION_WITHOUT_V=${TAG_NAME:1}
echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT
- name : Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Set Up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: login to Docker Hub
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Image
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
push: true
load: false
build-args: |
ASYNCAPI_CLI_VERSION=${{ steps.version.outputs.value }}
tags: |
asyncapi/cli:${{ steps.version.outputs.value }}
asyncapi/cli:latest
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha
- name: Sync README.md and Description to Docker Hub
uses: actions/checkout@v4
- uses: meeDamian/sync-readme@82715041300710d9be7c726c9d6c683b70451087 # v1.0.6
with:
user: ${{ secrets.DOCKER_USERNAME }}
pass: ${{ secrets.DOCKER_PASSWORD }}
slug: asyncapi/cli
description: CLI to work with your AsyncAPI files
publish-action-docker:
name: Release github action for cli and update version in action.yml
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Get version without v character
id: version
env:
TAG_NAME: ${{ github.event.release.tag_name }}
run: |
VERSION_WITHOUT_V=${TAG_NAME:1}
echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT
- name: Set Up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Login to Docker Hub
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
context: .
file: ./github-action/Dockerfile
push: true
tags: |
asyncapi/github-action-for-cli:${{ steps.version.outputs.value }}
asyncapi/github-action-for-cli:latest
platforms: linux/amd64,linux/arm64
- name: Change directory to github-action
run: |
cd github-action/
ls -la
- uses: meeDamian/sync-readme@82715041300710d9be7c726c9d6c683b70451087 # v1.0.6
with:
user: ${{ secrets.DOCKER_USERNAME }}
pass: ${{ secrets.DOCKER_PASSWORD }}
slug: asyncapi/github-action-for-cli
description: Github action for AsyncAPI CLI