Unverified Commit b4a0a984 authored by Josh Gross's avatar Josh Gross Committed by GitHub
Browse files

Merge branch 'main' into fix/deprecated-nodejs-usage-in-action

parents a954e16c b4b15b8c
Loading
Loading
Loading
Loading
+20
Changes for .github/workflows/publish-immutable-actions.yml: 20 added lines, 0 removed lines.
Original line number Diff line number Diff line
name: 'Publish Immutable Action Version'

on:
  release:
    types: [published]

jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
      packages: write

    steps:
      - name: Checking out
        uses: actions/checkout@v4
      - name: Publish
        id: publish
        uses: actions/[email protected]
+42 −1
Changes for .github/workflows/test.yml: 42 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -46,14 +46,19 @@ jobs:
    - name: Test
      run: npm run test

    # Test end-to-end by uploading two artifacts and then downloading them
    # Test end-to-end by uploading a few artifacts and then downloading them
    - name: Create artifact files
      run: |
        mkdir -p path/to/dir-1
        mkdir -p path/to/dir-2
        mkdir -p path/to/dir-3
        mkdir -p symlink/
        echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
        echo "Hello world from file #2" > path/to/dir-2/file2.txt
        echo "Hello from a symlinked file" > symlink/original.txt
        ln -s $(pwd)/symlink/original.txt symlink/abs.txt
        ln -s original.txt symlink/rel.txt
      shell: bash

    # Upload a single file artifact
    - name: 'Upload artifact #1'
@@ -79,6 +84,14 @@ jobs:
          path/to/dir-[23]/*
          !path/to/dir-3/*.txt

    - name: 'Upload symlinked artifact'
      uses: ./
      with:
        name: 'Symlinked-Artifact-${{ matrix.runs-on }}'
        path: |
          symlink/abs.txt
          symlink/rel.txt

    # Download Artifact #1 and verify the correctness of the content
    - name: 'Download artifact #1'
      uses: actions/download-artifact@v4
@@ -141,6 +154,34 @@ jobs:
        }
      shell: pwsh

    - name: 'Download symlinked artifact'
      uses: actions/download-artifact@v4
      with:
        name: 'Symlinked-Artifact-${{ matrix.runs-on }}'
        path: from/symlink

    - name: 'Verify symlinked artifact'
      run: |
        $abs = "from/symlink/abs.txt"
        if(!(Test-Path -path $abs))
        {
            Write-Error "Expected file does not exist"
        }
        if(!((Get-Content $abs) -ceq "Hello from a symlinked file"))
        {
            Write-Error "File contents of downloaded artifact are incorrect"
        }
        $rel = "from/symlink/rel.txt"
        if(!(Test-Path -path $rel))
        {
            Write-Error "Expected file does not exist"
        }
        if(!((Get-Content $rel) -ceq "Hello from a symlinked file"))
        {
            Write-Error "File contents of downloaded artifact are incorrect"
        }
      shell: pwsh

    - name: 'Alter file 1 content'
      run: |
        echo "This file has changed" > path/to/dir-1/file1.txt

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

Loading