Skip to content

v2.14.0

v2.14.0 #246

Workflow file for this run

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
run: |
VERSION=${{ github.event.release.tag_name }}
VERSION_WITHOUT_V=${VERSION:1}
echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT
- name : Checkout repository
uses: actions/checkout@v4
with:
ref: tags/${{ github.event.release.tag_name }}
- 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 }}
- name: Build Image
uses: docker/build-push-action@v4
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.1.1
- uses: meeDamian/sync-readme@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
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: master
- 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 ${{env.DOCKER_PASSWORD}} | docker login -u ${{env.DOCKER_USERNAME}} --password-stdin
npm run action:docker:build
docker tag asyncapi/github-action-for-cli:latest asyncapi/github-action-for-cli:${{ steps.version.outputs.value }}
docker push asyncapi/github-action-for-cli:${{ steps.version.outputs.value }}
docker push asyncapi/github-action-for-cli:latest
- name: Change directory to github-action
run: |
cd github-action/
ls -la
- uses: meeDamian/sync-readme@v1.0.6
with:
user: ${{ env.DOCKER_USERNAME }}
pass: ${{ env.DOCKER_PASSWORD }}
slug: asyncapi/github-action-for-cli
description: Github action for AsyncAPI CLI