Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 18 additions & 20 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,23 @@ jobs:
- os: ubuntu-latest
artifact: 'ubuntu'
command: './_AutoinstallCreator/release.sh'

- os: windows-latest
artifact: 'windows'
command: './.tools/busybox.exe sh ./_AutoinstallCreator/release.sh'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # need for self_count
- run: ${{ matrix.command }}
- name: Run release script
id: create_artifact

- uses: actions/upload-artifact@v3
run: ${{ matrix.command }}
- uses: actions/upload-artifact@v4
with:
name: AutoinstallCreator-${{ matrix.artifact }}
path: ${{ steps.create_artifact.outputs.artifact_path }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: body
name: body-${{ matrix.artifact }}
path: ./body.md

upload_release:
Expand All @@ -49,23 +46,24 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
timeoutSeconds: 1800

- name: setFailed when not wait-for-build
uses: actions/github-script@v6
- name: Fail if build unsuccessful
uses: actions/github-script@v7
if: steps.wait-for-build.outputs.conclusion != 'success'
with:
script: |
core.setFailed('error: conclusion is ${{ steps.wait-for-build.outputs.conclusion }}')

- uses: actions/checkout@v3
- run: git push origin :refs/tags/latest-${{ github.base_ref || github.ref_name }}

- uses: actions/download-artifact@v3
core.setFailed('Error: Build conclusion is ${{ steps.wait-for-build.outputs.conclusion }}')
- uses: actions/checkout@v4
- name: Delete existing tag
run: git push origin :refs/tags/latest-${{ github.base_ref || github.ref_name }}
continue-on-error: true
- uses: actions/download-artifact@v4
with:
path: artifacts
- uses: ncipollo/release-action@v1
with:
tag: latest-${{ github.base_ref || github.ref_name }}
artifacts: ./AutoinstallCreator-*/*
bodyFile: ./body/body.md
artifacts: ./artifacts/AutoinstallCreator-*/*
bodyFile: ./artifacts/body-ubuntu/body.md # Pick one, e.g., Ubuntu’s body
allowUpdates: true
removeArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
28 changes: 8 additions & 20 deletions .github/workflows/ci-test-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,19 @@ jobs:
runs-on: ${{ matrix.os }}
env:
IMAGE_NAME: mcr.microsoft.com/windows/nanoserver:ltsc2022-amd64

strategy:
matrix:
include:
- os: ubuntu-latest
container: 'ubuntu:22.04'
artifact: 'ubuntu'

- os: ubuntu-latest
container: 'alpine:3.15.0'
artifact: 'alpine'

- os: windows-latest
artifact: 'windows'

- os: windows-latest
artifact: 'nanoserver'

container: ${{ matrix.container }}
steps:
- name: Install Ubuntu packages
Expand All @@ -38,26 +33,22 @@ jobs:
apt update
apt install -y busybox dos2unix libarchive-tools python3 git
git config --global --add safe.directory '*'

- name: Install Alpine packages
if: matrix.artifact == 'alpine'
run: |
apk add --no-cache bash libarchive-tools python3 git
git config --global --add safe.directory '*'

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # need for self_count

- name: ci test-run (non windows)
- name: CI test-run (non-Windows)
if: matrix.os != 'windows-latest'
run: .tests/ci-test-run.sh

- name: ci test-run (windows)
- name: CI test-run (Windows)
if: matrix.artifact == 'windows'
shell: cmd
run: |
rm -f "C:\Strawberry\perl\bin\shasum.BAT"
if exist "C:\Strawberry\perl\bin\shasum.BAT" del "C:\Strawberry\perl\bin\shasum.BAT"
call .tests\ci-test-run.bat

- name: pull (nanoserver) container ${{ env.IMAGE_NAME }}
Expand All @@ -74,7 +65,7 @@ jobs:
test-create:
needs: test
runs-on: ${{ matrix.os }}
name: Run test-create
name: Run test-create (${{ matrix.os }}, ${{ matrix.artifact }})
strategy:
matrix:
include:
Expand All @@ -83,16 +74,13 @@ jobs:

- os: windows-latest
artifact: 'windows'

container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3

- name: External test-run (non windows)
- uses: actions/checkout@v4
- name: External test-run (non-Windows)
if: matrix.os != 'windows-latest'
run: .tests/test-run.sh -- testExternalCreate

- name: External test-run (windows)
- name: External test-run (Windows)
if: matrix.os == 'windows-latest'
shell: cmd
run: call .tests\test-run.bat -- testExternalCreate
Loading