Skip to content

Commit

Permalink
ci: bump artifact actions to v4 (#1601)
Browse files Browse the repository at this point in the history
* fix .github/workflows/test-action.yml to bump up to latest version

* chore: bump rest of the download actions

* chore: ignore dockerfiles in sonarcloud

* fix: release docker workflow

* chore: add changeset

---------

Co-authored-by: Ashish Padhy <[email protected]>
  • Loading branch information
Sahil-Shadwal and Shurtu-gal authored Dec 21, 2024
1 parent 3d67ddf commit da64c63
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-paws-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@asyncapi/cli": patch
---

ci: bump artifact actions to v4
2 changes: 1 addition & 1 deletion .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name : Checkout repository
uses: actions/checkout@v4
with:
ref: tags/${{ github.event.release.tag_name }}
ref: ${{ github.event.release.tag_name }}

- name: Set Up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
- if: >
!github.event.pull_request.draft && !(
(github.actor == 'asyncapi-bot' && (
startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') ||
startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') ||
startsWith(github.event.pull_request.title, 'chore(release):')
)) ||
(github.actor == 'asyncapi-bot-eve' && (
startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') ||
startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') ||
startsWith(github.event.pull_request.title, 'chore(release):')
)) ||
(github.actor == 'allcontributors[bot]' &&
(github.actor == 'allcontributors[bot]' &&
startsWith(github.event.pull_request.title, 'docs: add')
)
)
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
tags: asyncapi/github-action-for-cli:${{ steps.docker_version.outputs.action_version }}
outputs: type=docker,dest=/tmp/asyncapi.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: asyncapi
path: /tmp/asyncapi.tar
Expand All @@ -66,7 +66,7 @@ jobs:
needs: [should-workflow-run, build-docker]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: asyncapi
path: /tmp
Expand All @@ -81,8 +81,8 @@ jobs:
filepath: ./github-action/test/asyncapi.yml
- name: Assert GitHub Action
run: |
echo "Listing all files"
ls -R
echo "Listing all files"
ls -R
echo "Asserting GitHub Action"
if [ -f "./output/asyncapi.md" ]; then
echo "Files exist"
Expand All @@ -98,7 +98,7 @@ jobs:
needs: [should-workflow-run, build-docker]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: asyncapi
path: /tmp
Expand All @@ -119,7 +119,7 @@ jobs:
needs: [should-workflow-run, build-docker]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: asyncapi
path: /tmp
Expand All @@ -146,14 +146,14 @@ jobs:
echo "Action failed"
exit 1
fi
test-custom-output:
if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
runs-on: ubuntu-latest
needs: [should-workflow-run, build-docker]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: asyncapi
path: /tmp
Expand All @@ -179,14 +179,14 @@ jobs:
echo "Action failed"
exit 1
fi
test-file-not-found:
if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
runs-on: ubuntu-latest
needs: [should-workflow-run, build-docker]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: asyncapi
path: /tmp
Expand All @@ -209,14 +209,14 @@ jobs:
else
echo "Test Success: non_existent_file.yml threw an error as expected"
fi
test-invalid-input:
if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
runs-on: ubuntu-latest
needs: [should-workflow-run, build-docker]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: asyncapi
path: /tmp
Expand Down Expand Up @@ -248,7 +248,7 @@ jobs:
needs: [should-workflow-run, build-docker]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: asyncapi
path: /tmp
Expand All @@ -275,14 +275,14 @@ jobs:
echo "Action failed"
exit 1
fi
test-bundle:
if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
runs-on: ubuntu-latest
needs: [should-workflow-run, build-docker]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: asyncapi
path: /tmp
Expand All @@ -309,14 +309,14 @@ jobs:
echo "Action failed"
exit 1
fi
test-convert:
if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
runs-on: ubuntu-latest
needs: [should-workflow-run, build-docker]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: asyncapi
path: /tmp
Expand All @@ -329,7 +329,7 @@ jobs:
uses: ./
with:
command: convert
filepath: github-action/test/asyncapi.yml
filepath: github-action/test/asyncapi.yml
output: output/convert/asyncapi.yaml
- name: Assert GitHub Action
run: |
Expand Down
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sonar.exclusions=test/**/*,Dockerfile
sonar.exclusions=test/**/*,Dockerfile,github-action/Dockerfile
sonar.issue.ignore.multicriteria=e1,e2

# Exclude copy recursively and root user issue in Dockerfile
Expand Down

0 comments on commit da64c63

Please sign in to comment.