Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update actions/upload-artifact@v3 in pr-receive.yaml and pr-close-signal.yaml #2

Open
ns-rse opened this issue Dec 12, 2024 · 0 comments
Assignees
Labels

Comments

@ns-rse
Copy link
Contributor

ns-rse commented Dec 12, 2024

The @v3 action will no longer be supported as of 2025-01-30.

The .github/workflows/pr-receive.yaml and .github/workflows/pr-close-signal.yaml need updating to use @v4.

There may be some impact, see the following changes for more on these changes...

IMPORTANT I think if you have the update-workflows.yaml enabled to run then you should already be up-to-date. It doesn't look like these are enabled on this repository so it might be worth enabling them, see the instructions here .

I've done a diff for the two affected files (as I've one repository that uses v4 already and one that uses v3) and the differences are pretty small, all but one is just the number change but the Upload PR step adds overwrite: true to the with: section (Also the runs-on: ubuntu-22.04 is in the newer version as ubuntu-latest doesn't include R by default).

❱ diff -u pr-receive-v3.yaml pr-receive-v4.yaml
--- pr-receive-v3.yaml	2024-06-25 13:25:47.551326412 +0100
+++ pr-receive-v4.yaml	2024-10-31 07:59:21.687545904 +0000
@@ -13,7 +13,7 @@
   test-pr:
     name: "Record PR number"
     if: ${{ github.event.action != 'closed' }}
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
     outputs:
       is_valid: ${{ steps.check-pr.outputs.VALID }}
     steps:
@@ -25,7 +25,7 @@
       - name: "Upload PR number"
         id: upload
         if: ${{ always() }}
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: pr
           path: ${{ github.workspace }}/NR
@@ -48,7 +48,7 @@
   build-md-source:
     name: "Build markdown source files if valid"
     needs: test-pr
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
     if: ${{ needs.test-pr.outputs.is_valid == 'true' }}
     env:
       GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
@@ -58,10 +58,10 @@
       MD: ${{ github.workspace }}/site/built
     steps:
       - name: "Check Out Main Branch"
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: "Check Out Staging Branch"
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
         with:
           ref: md-outputs
           path: ${{ env.MD }}
@@ -107,20 +107,21 @@
         shell: Rscript {0}
 
       - name: "Upload PR"
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: pr
           path: ${{ env.PR }}
+          overwrite: true
 
       - name: "Upload Diff"
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: diff
           path: ${{ env.CHIVE }}
           retention-days: 1
 
       - name: "Upload Build"
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: built
           path: ${{ env.MD }}
❱ diff -u pr-close-signal-v3.yaml pr-close-signal-v4.yaml
--- pr-close-signal-v3.yaml	2024-06-25 13:25:47.551326412 +0100
+++ pr-close-signal-v4.yaml	2024-10-31 07:59:21.687545904 +0000
@@ -8,7 +8,7 @@
 jobs:
   send-close-signal:
     name: "Send closing signal"
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
     if: ${{ github.event.action == 'closed' }}
     steps:
       - name: "Create PRtifact"
@@ -16,8 +16,7 @@
           mkdir -p ./pr
           printf ${{ github.event.number }} > ./pr/NUM
       - name: Upload Diff
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: pr
           path: ./pr
-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants