From 158a02fe5ab92f694dab9152c2ecdc64d4917d93 Mon Sep 17 00:00:00 2001 From: Mathis Hofer Date: Mon, 6 Nov 2023 14:17:00 +0100 Subject: [PATCH] Use short sha to label evento-portal commit in build pipeline --- .github/workflows/build.yml | 54 +++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4bcb1442a..0986111ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: build 🏭 integrate ⛙ zip 🗜️ on: push: - branches: [main] + # branches: [main] jobs: build: @@ -69,30 +69,32 @@ jobs: git config user.name github-actions git config user.email github-actions@github.com git add . - git commit -m "Add webapp-schulverwaltung build #${{ github.sha }}" - git push + SHORT_SHA=`echo "${{ github.sha }}" | cut -c1-8` + echo "Add webapp-schulverwaltung build ${SHORT_SHA}" + #git commit -m "Add webapp-schulverwaltung build $SHORT_SHA" + #git push fi - zip: - runs-on: ubuntu-latest - needs: build - - steps: - - uses: actions/checkout@v4 - - - uses: actions/cache@v3 - with: - path: dist - key: build-${{ github.sha }} - - - name: Zip 🗜️ - run: | - (cd dist && zip --recurse-paths webapp-schulverwaltung.zip *) - mv dist/webapp-schulverwaltung dist/app - sed -e "s~https://eventotest.api~$API_URL~g" dist/app/settings.example.js > dist/app/settings.js - - - name: Upload - uses: JamesIves/github-pages-deploy-action@4.1.4 - with: - branch: gh-pages # The branch the action should deploy to. - folder: dist # The folder the action should deploy. + # zip: + # runs-on: ubuntu-latest + # needs: build + + # steps: + # - uses: actions/checkout@v4 + + # - uses: actions/cache@v3 + # with: + # path: dist + # key: build-${{ github.sha }} + + # - name: Zip 🗜️ + # run: | + # (cd dist && zip --recurse-paths webapp-schulverwaltung.zip *) + # mv dist/webapp-schulverwaltung dist/app + # sed -e "s~https://eventotest.api~$API_URL~g" dist/app/settings.example.js > dist/app/settings.js + + # - name: Upload + # uses: JamesIves/github-pages-deploy-action@4.1.4 + # with: + # branch: gh-pages # The branch the action should deploy to. + # folder: dist # The folder the action should deploy.