-
-
Notifications
You must be signed in to change notification settings - Fork 33
46 lines (42 loc) · 1.67 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
name: Release Docker Image
on:
release:
types:
- published
jobs:
publish-docker:
name: Generating Docker
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- 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: Release to Docker
run: |
echo ${{secrets.DOCKER_PASSWORD}} | docker login -u ${{secrets.DOCKER_USERNAME}} --password-stdin
npm run docker:build
docker tag asyncapi/server-api:latest asyncapi/server-api:${{ steps.version.outputs.value }}
docker push asyncapi/server-api:${{ steps.version.outputs.value }}
docker push asyncapi/server-api:latest
- uses: meeDamian/sync-readme@82715041300710d9be7c726c9d6c683b70451087 #version 1.0.6 https://github.com/meeDamian/sync-readme/releases/tag/v1.0.6
with:
user: ${{secrets.DOCKER_USERNAME}}
pass: ${{ secrets.DOCKER_PASSWORD }}
slug: asyncapi/server-api
description: Server API providing official AsyncAPI tools
deploy-app:
name: Deploy to DigitalOcean App
needs: publish-docker
runs-on: ubuntu-latest
steps:
- name: Deploy to DigitalOcean App
uses: digitalocean/app_action@v1.1.5
with:
app_name: "server-api"
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
images: '[{"name":"asyncapi-server-api","image":{"registry_type":"DOCKER_HUB","registry":"asyncapi","repository":"server-api","tag":"latest"}}]'