Skip to content

feat: add short sha in course-work-deploy.yml #9

feat: add short sha in course-work-deploy.yml

feat: add short sha in course-work-deploy.yml #9

name: Course Work Deploy
on:
push:
branches:
- main
paths:
- 'course-work/**'
- '.github/workflows/course-work-deploy.yml'
jobs:
course-work-deploy:
runs-on: ubuntu-latest
steps:
- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Get current time
uses: josStorer/get-current-time@v2
id: current-time
with:
format: YYYYMMDD-HH
utcOffset: "+03:00"
- name: Checkout code
uses: actions/checkout@v2
- name: Upload to gdrive
uses: adityak74/google-drive-upload-git-action@main
with:
credentials: ${{ secrets.DRIVE_CREDENTIALS }}
filename: course-work/course-work.pdf
folderId: ${{ secrets.DRIVE_FOLDER_ID }}
name: ${{ steps.current-time.outputs.time }}-sha-${{ steps.vars.outputs.sha_short }}.pdf
overwrite: "true"