Skip to content

Commit

Permalink
Use short sha to label evento-portal commit in build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
hupf committed Nov 6, 2023
1 parent 7c81ac7 commit 54131db
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: build 🏭 integrate ⛙ zip 🗜️

on:
push:
branches: [main]
# branches: [main]

jobs:
build:
Expand Down Expand Up @@ -69,30 +69,34 @@ jobs:
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Add webapp-schulverwaltung build #${{ github.sha }}"
git push
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-8)
echo "::debug::Add webapp-schulverwaltung build ${SHORT_SHA}"
echo "::debug::Add webapp-schulverwaltung build $SHORT_SHA"
echo "::debug::Add webapp-schulverwaltung build ${{ github.sha.substr(0, 8) }}"
#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/[email protected]
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/[email protected]
# with:
# branch: gh-pages # The branch the action should deploy to.
# folder: dist # The folder the action should deploy.

0 comments on commit 54131db

Please sign in to comment.