substring git sha
This commit is contained in:
8
.github/workflows/build-resume.yaml
vendored
8
.github/workflows/build-resume.yaml
vendored
@@ -14,10 +14,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
current-date: ${{ steps.get-date.outputs.current-date }}
|
current-date: ${{ steps.get-date.outputs.current-date }}
|
||||||
|
commit-sha: ${{ steps.get-sha.outputs.commit-sha }}
|
||||||
steps:
|
steps:
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
id: get-date
|
id: get-date
|
||||||
run: echo "current-date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
run: echo "current-date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||||
|
- name: Get first 7 characters of commit SHA
|
||||||
|
id: get-sha
|
||||||
|
run: echo "commit-sha=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: date-fetch
|
needs: date-fetch
|
||||||
@@ -45,7 +49,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: result/Alice_Huston_Resume_Software_Engineer.pdf
|
files: result/Alice_Huston_Resume_Software_Engineer.pdf
|
||||||
tag_name: alice-huston-resume-${{ needs.date-fetch.outputs.current-date }}-${{ github.sha }}
|
tag_name: alice-huston-resume-${{ needs.date-fetch.outputs.current-date }}-${{ needs.date-fetch.outputs.commit-sha }}
|
||||||
body: "Resume PDF built from commit ${{ github.sha }}"
|
body: "Resume PDF built from commit ${{ github.sha }} on ${{ needs.date-fetch.outputs.current-date }}."
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Reference in New Issue
Block a user