tải lên cấu phần phần mềm trong GitHub Action
Sep 23 2020
Làm cách nào để cập nhật mã sau để cấu phần đó chứa một thư mục có tên 'Tập lệnh' và tất cả các tệp được sao chép vào thư mục 'Tập lệnh'?
- 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 }}
Trả lời
ItayBrenner Sep 23 2020 at 23:00
Bạn có thể sử dụng cái này:
- 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 }}
Chỉ cần tạo một thư mục giữa cấu phần phần mềm của bạn và các tệp mong muốn của bạn