Skip to content

chore: wip

chore: wip #1595

name: Release Code Templates
on:
push:
jobs:
ZipAndRelease:
runs-on: ubuntu-latest
steps:
- name: Check Out Code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: check modified files
id: check_files
run: |
echo "========== check paths of modified files =========="
git diff --name-only HEAD~1 HEAD > files.txt
echo "::set-output name=run_job::false"
while IFS= read -r file
do
if [[ $file = templates/* ]]; then
echo "::set-output name=run_job::true"
break
fi
done < files.txt
- name: Zip Templates
if: steps.check_files.outputs.run_job == 'true'
run: |
cd ./templates/distributed-calculator;
zip -r ../../distributed-calculator.zip ./* .[!.]*;
cd -
mkdir upload
mv ./distributed-calculator.zip upload/
- uses: LanceMcCarthy/Action-AzureBlobUpload@v2
if: steps.check_files.outputs.run_job == 'true'
name: Uploading to Azure storage...
with:
connection_string: ${{ secrets.VSDaprTemplatesConnStr }}
container_name: templates
source_folder: upload/
delete_if_exists: true