From 9c021c396276a27a140861bc73e66e486e5ac903 Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Mon, 8 Apr 2024 16:46:22 +0200 Subject: [PATCH] Build dotnet with GitHub Actions Signed-off-by: Ilya Leoshkevich --- .github/workflows/dotnet.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..f460db2 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,30 @@ +name: Build dotnet + +on: + push: + branches: + - main + pull_request: # XXX + +jobs: + toolchain: + runs-on: ubuntu-latest + strategy: + matrix: + arch: [ppc64le, s390x, x64] + container: + image: ghcr.io/ibm/dotnet-${{ matrix.arch }}-toolchain:latest + credentials: + username: ${{ secrets.GHCR_USERNAME }} + password: ${{ secrets.GHCR_PASSWORD }} + steps: + - name: Configure git + run: git config --global user.email iii@linux.ibm.com && + git config --global user.name "dotnet-s390x bot" + - name: Clone # actions/checkout is not compatible with Ubuntu 18.04 + run: git clone "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git" --branch="$GITHUB_REF_NAME" && + git checkout "$GITHUB_SHA" + - name: Prepare + run: cd dotnet-s390x && ./dotnet-prepare + - name: Build + run: cd dotnet-s390x && ARCH=${{ matrix.arch }} NO_SAVE_TEMPS=1 ./dotnet-build