From 5c093f297d856189042feb7856a03a57fe1b182f Mon Sep 17 00:00:00 2001 From: aramissennyeydd Date: Mon, 27 May 2024 20:39:11 -0400 Subject: [PATCH 1/5] fix(ci): workflow files aren't saving artifacts as expected Signed-off-by: aramissennyeydd --- .github/workflows/api-breaking-changes.yml | 11 +++-------- .github/workflows/uffizzi-build.yml | 13 ++++--------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/api-breaking-changes.yml b/.github/workflows/api-breaking-changes.yml index 5f456a9b0b..0f51dc152f 100644 --- a/.github/workflows/api-breaking-changes.yml +++ b/.github/workflows/api-breaking-changes.yml @@ -45,14 +45,9 @@ jobs: uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: name: preview-spec - path: comment.md + path: | + comment.md + ${{ github.event_path }} retention-days: 2 overwrite: true - - name: Upload PR Event as Artifact - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 - with: - name: preview-spec - path: ${{ github.event_path }} - retention-days: 2 - overwrite: true diff --git a/.github/workflows/uffizzi-build.yml b/.github/workflows/uffizzi-build.yml index 5ab208590a..3542858273 100644 --- a/.github/workflows/uffizzi-build.yml +++ b/.github/workflows/uffizzi-build.yml @@ -97,18 +97,13 @@ jobs: kustomize edit set image backstage=${{ needs.build-backstage.outputs.tags }} kustomize build . > manifests.rendered.yml cat manifests.rendered.yml - - name: Upload Rendered Manifests File as Artifact + - name: Upload Artifacts uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: name: preview-spec - path: ./.github/uffizzi/k8s/manifests/manifests.rendered.yml - retention-days: 2 - overwrite: true - - name: Upload PR Event as Artifact - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 - with: - name: preview-spec - path: ${{ github.event_path }} + path: | + ./.github/uffizzi/k8s/manifests/manifests.rendered.yml + ${{ github.event_path }} retention-days: 2 overwrite: true From 0413878007aec63331ff487712d44d51a03e6a97 Mon Sep 17 00:00:00 2001 From: aramissennyeydd Date: Mon, 27 May 2024 20:48:29 -0400 Subject: [PATCH 2/5] workflows: adjust name of workflow Signed-off-by: aramissennyeydd --- .github/workflows/api-breaking-changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-breaking-changes.yml b/.github/workflows/api-breaking-changes.yml index 0f51dc152f..ddf8bde41d 100644 --- a/.github/workflows/api-breaking-changes.yml +++ b/.github/workflows/api-breaking-changes.yml @@ -41,7 +41,7 @@ jobs: run: | yarn backstage-repo-tools repo schema openapi check --since origin/${{ github.base_ref }} > comment.md - - name: Upload Rendered Comment as Artifact + - name: Upload Artifacts uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: name: preview-spec From 50a608a7d90e0ac4633b0994664cd0bd68107fbc Mon Sep 17 00:00:00 2001 From: aramissennyeydd Date: Mon, 27 May 2024 21:12:24 -0400 Subject: [PATCH 3/5] workflows: clone events.json locally Signed-off-by: aramissennyeydd --- .github/workflows/api-breaking-changes.yml | 6 +++++- .github/workflows/uffizzi-build.yml | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/api-breaking-changes.yml b/.github/workflows/api-breaking-changes.yml index ddf8bde41d..4a470290cd 100644 --- a/.github/workflows/api-breaking-changes.yml +++ b/.github/workflows/api-breaking-changes.yml @@ -41,13 +41,17 @@ jobs: run: | yarn backstage-repo-tools repo schema openapi check --since origin/${{ github.base_ref }} > comment.md + - name: clone github events.json to local path + run: | + cat ${{ github.event_path }} > events.json + - name: Upload Artifacts uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: name: preview-spec path: | comment.md - ${{ github.event_path }} + events.json retention-days: 2 overwrite: true diff --git a/.github/workflows/uffizzi-build.yml b/.github/workflows/uffizzi-build.yml index 3542858273..b981b46e0a 100644 --- a/.github/workflows/uffizzi-build.yml +++ b/.github/workflows/uffizzi-build.yml @@ -97,13 +97,18 @@ jobs: kustomize edit set image backstage=${{ needs.build-backstage.outputs.tags }} kustomize build . > manifests.rendered.yml cat manifests.rendered.yml + + - name: clone github events.json locally + run: | + cat ${{ github.event_path }} > events.json + - name: Upload Artifacts uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: name: preview-spec path: | ./.github/uffizzi/k8s/manifests/manifests.rendered.yml - ${{ github.event_path }} + events.json retention-days: 2 overwrite: true From 89e2ddf2158b2d7fcf591281d668952dbc97ba6b Mon Sep 17 00:00:00 2001 From: aramissennyeydd Date: Mon, 27 May 2024 22:29:18 -0400 Subject: [PATCH 4/5] workflow: stage all files into top level zip dir Signed-off-by: aramissennyeydd --- .github/workflows/api-breaking-changes.yml | 6 +++--- .github/workflows/uffizzi-build.yml | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/api-breaking-changes.yml b/.github/workflows/api-breaking-changes.yml index 4a470290cd..12fda469ee 100644 --- a/.github/workflows/api-breaking-changes.yml +++ b/.github/workflows/api-breaking-changes.yml @@ -41,9 +41,9 @@ jobs: run: | yarn backstage-repo-tools repo schema openapi check --since origin/${{ github.base_ref }} > comment.md - - name: clone github events.json to local path + - name: clone artifacts to current directory run: | - cat ${{ github.event_path }} > events.json + cat ${{ github.event_path }} > event.json - name: Upload Artifacts uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 @@ -51,7 +51,7 @@ jobs: name: preview-spec path: | comment.md - events.json + event.json retention-days: 2 overwrite: true diff --git a/.github/workflows/uffizzi-build.yml b/.github/workflows/uffizzi-build.yml index b981b46e0a..95a4fa2e11 100644 --- a/.github/workflows/uffizzi-build.yml +++ b/.github/workflows/uffizzi-build.yml @@ -98,17 +98,18 @@ jobs: kustomize build . > manifests.rendered.yml cat manifests.rendered.yml - - name: clone github events.json locally + - name: clone artifacts into current directory run: | - cat ${{ github.event_path }} > events.json + cat ${{ github.event_path }} > event.json + cp ./.github/uffizzi/k8s/manifests/manifests.rendered.yml manifests.rendered.yml - name: Upload Artifacts uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: name: preview-spec path: | - ./.github/uffizzi/k8s/manifests/manifests.rendered.yml - events.json + manifests.rendered.yml + event.json retention-days: 2 overwrite: true From 18e6e7a14a65531009d0a019d6c4481948126797 Mon Sep 17 00:00:00 2001 From: aramissennyeydd Date: Mon, 27 May 2024 22:38:49 -0400 Subject: [PATCH 5/5] fix prettier Signed-off-by: aramissennyeydd --- .github/workflows/api-breaking-changes.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/api-breaking-changes.yml b/.github/workflows/api-breaking-changes.yml index 12fda469ee..711842a02c 100644 --- a/.github/workflows/api-breaking-changes.yml +++ b/.github/workflows/api-breaking-changes.yml @@ -54,4 +54,3 @@ jobs: event.json retention-days: 2 overwrite: true -