diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..12e85e6 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,22 @@ +name: build zip with latest commit hash +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + 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*" + - name: Upload Archive as Artifact + uses: actions/upload-artifact@v3 + with: + name: repo-archive-with-hash + path: archive_with_hash.zip