From 050d8762ada7535864d149be044fbaa220cb85a4 Mon Sep 17 00:00:00 2001 From: Kathryn Anne S Tan Date: Sun, 5 May 2024 18:58:12 +0300 Subject: [PATCH] Add step to commit build to repository, include permissions for content writing --- .github/workflows/build.yml | 27 +++++++++++++++++---------- .github/workflows/ci.yml => ci.yml | 1 + 2 files changed, 18 insertions(+), 10 deletions(-) rename .github/workflows/ci.yml => ci.yml (98%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6dd1227..39e2274 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,14 +1,20 @@ name: Run Builds on: [push] - + +permissions: + contents: write + jobs: - tests: + build: name: Run Builds runs-on: ubuntu-latest + strategy: + matrix: + target: [built, committed] steps: - uses: actions/checkout@v3 - + - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -24,12 +30,13 @@ jobs: - name: Run windows builds run: vendor/bin/haulable builds/dockerfile-laravel --platform="All Platforms" - + - name: Move builds into the builds folder - run: mv windows_x64 builds/windows_x64 && \ - mv linux_aarch64 builds/linux_aarch64 && \ - mv linux_x86_64 builds/linux_x86_64 && \ - mv macos_apple builds/macos_apple && \ - mv macos_intel builds/macos_intel - + run: mv windows_x64 builds/windows_x64 && mv linux_aarch64 builds/linux_aarch64 && mv linux_x86_64 builds/linux_x86_64 && mv macos_apple builds/macos_apple && mv macos_intel builds/macos_intel + - name: Commit report + run: | + git config --global user.name 'Kathryn Tan' + git config --global user.email 'ktan.software.developer@users.noreply.github.com' + git commit -am "Automated build" + git push \ No newline at end of file diff --git a/.github/workflows/ci.yml b/ci.yml similarity index 98% rename from .github/workflows/ci.yml rename to ci.yml index 39c9a0c..0198b3f 100644 --- a/.github/workflows/ci.yml +++ b/ci.yml @@ -7,6 +7,7 @@ jobs: name: Run tests runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 - name: Setup PHP