Artefakt in GitHub Action hochladen

Sep 23 2020

Wie aktualisiere ich den folgenden Code, sodass das Artefakt einen Ordner mit dem Namen "Skripte" enthält und alle Dateien in den Ordner "Skripte" kopiert werden?

 - name: copy scripts
      run: Copy 'Scripts/' '${{ github.workspace }}/Scripts' shell: powershell - name: publish artifact uses: actions/upload-artifact@v2 with: path: ${{ github.workspace }}/Scripts
        name: ${{ github.run_number }}

Antworten

ItayBrenner Sep 23 2020 at 23:00

Sie können dies verwenden:

 - name: Create Artifact Folder
   run: New-Item -Path '${{ github.workspace }}' -Name "Artifacts" -ItemType "directory" shell: powershell - name: Copy Scripts run: Copy 'Scripts/' '${{ github.workspace }}/Artifacts/Scripts'
   shell: powershell
 - name: Publish Artifact
   uses: actions/upload-artifact@v2
   with:
     path: ${{ github.workspace }}/Artifacts name: ${{ github.run_number }}

Erstellen Sie einfach einen Ordner zwischen Ihrem Artefakt und Ihren gewünschten Dateien