Skip to content

Commit

Permalink
feat: add automation of version in action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Shurtu-gal committed Jan 9, 2024
1 parent 4983c73 commit 31cd450
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
VERSION=${{github.event.release.tag_name}}
VERSION_WITHOUT_V=${VERSION:1}
echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT
- name: Update version in action.yml
run: |
sed "s/docker:\/\/asyncapi\/github-action-for-cli:.*$/docker:\/\/asyncapi\/github-action-for-cli:${{ steps.version.outputs.value }}'/g" action.yml > action.yml.tmp
mv action.yml.tmp action.yml
- name: Release to Docker
run: |
echo ${{secrets.DOCKER_PASSWORD}} | docker login -u ${{secrets.DOCKER_USERNAME}} --password-stdin
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Sample usage:

```yaml
- name: Generating HTML from my AsyncAPI document
uses: asyncapi/[email protected].1 # You can use any version you want
uses: asyncapi/[email protected].2 # You can use any version you want
with:
custom_command: bundle ./asyncapi.yaml --output final-asyncapi.yaml
```
Expand Down Expand Up @@ -113,7 +113,7 @@ In case you do not want to use defaults, you for example want to use different t

```yaml
- name: Generating HTML from my AsyncAPI document
uses: asyncapi/[email protected].1 # You can use any version you want
uses: asyncapi/[email protected].2 # You can use any version you want
with:
command: generate
filepath: ./docs/api/asyncapi.yaml
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
#In case you do not want to use defaults, you for example want to use different template
- name: Generating HTML from my AsyncAPI document
uses: asyncapi/[email protected].1 # You can use any version you want
uses: asyncapi/[email protected].2 # You can use any version you want
with:
template: '@asyncapi/[email protected]' #In case of template from npm, because of @ it must be in quotes
filepath: docs/api/my-asyncapi.yml
Expand Down
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ inputs:

runs:
using: 'docker'
# This is the image that will be used to run the action. The version of the image is changed automatically by releasing a new version of the action.
image: 'docker://asyncapi/github-action-for-cli:3.0.1'
args:
- ${{ inputs.cli_version }}
Expand Down

0 comments on commit 31cd450

Please sign in to comment.