Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wbglaeser committed Apr 10, 2024
1 parent 45e0832 commit 05550e0
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@ on:
jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: check out repository
uses: actions/checkout@v3
- name: get latest commit hash
run: echo "LATEST_COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: create commit hash file
run: echo $LATEST_COMMIT_HASH > latest_commit_hash.txt
- name: Archive Repository with Commit Hash
run: zip -r archive_with_hash.zip . -x "*.git*" -x "*.github*"
- name: Upload to zip-archive branch

- name: Archive Repository
run: zip -r archive.zip . -x "*.git*" -x "*.github*"

- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Upload to zip-archive branch
run: |
git checkout --orphan temp-branch
git rm -rf .
git add -f archive_with_hash.zip
git add -f archive.zip
git commit -m "Upload latest zip archive"
git branch -M zip-archive
git push -fu origin zip-archive

0 comments on commit 05550e0

Please sign in to comment.