Skip to content

Commit

Permalink
workflows: use actions/upload-artifact@v4 (#912)
Browse files Browse the repository at this point in the history
* workflows: use actions/upload-artifact@v4

* Remove duplicate upload in same workflow.
  • Loading branch information
andrewsomething committed Sep 16, 2024
1 parent 19b4102 commit 343fa55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/spec.main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ jobs:
- name: Bundle
run: make bundle

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: openapi-bundled
path: tests/openapi-bundled.yaml

- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

- name: Check outputs
run: echo ${{ steps.vars.outputs.sha_short }}

- name: Upload Main spec
run: >-
aws s3 cp tests/openapi-bundled.yaml
Expand All @@ -55,6 +58,7 @@ jobs:
SPACES_PATH: ${{ secrets.SPACES_PATH }}
SPACES_ENDPOINT: ${{ secrets.SPACES_ENDPOINT }}
AWS_EC2_METADATA_DISABLED: true

- name: Upload revision spec
# this uploads a duplicate of the bundled spec with the short sha
# appended to the file name for reference during client generation.
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/spec.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Bundle
run: make bundle

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: openapi-bundled
path: tests/openapi-bundled.yaml
Expand All @@ -55,11 +55,6 @@ jobs:
- name: Bundle
run: make bundle

- uses: actions/upload-artifact@v2
with:
name: openapi-bundled
path: tests/openapi-bundled.yaml

- name: Upload PR spec
run: >-
aws s3 cp tests/openapi-bundled.yaml
Expand Down

0 comments on commit 343fa55

Please sign in to comment.