Skip to content

Update pipeline.yml #28

Update pipeline.yml

Update pipeline.yml #28

Workflow file for this run

name: build zip with latest commit hash
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: check out repository
uses: actions/checkout@v3
- name: create latest commit hash file
run: echo $(git rev-parse HEAD) >> latest_commit_hash.txt
- name: Archive Repository with Commit Hash
run: zip -r archive_with_hash.zip . -x "*.git*" -x "*.github*"
- name: Configure git user
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
- name: Create new local branch
run: git checkout -b temp-zip-branch
- name: Remove all files except the ZIP
run: |
git add archive_with_hash.zip
git commit -m "Update ZIP archive with latest commit hash"
- name: Force push to zip-archive branch
run: git push origin temp-zip-branch:zip-archive --force