Update pipeline.yml #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Upload Archive as Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: repo-archive-with-hash | |
path: archive_with_hash.zip |