From 780b6deb0a015567e09656bfac63ff0d0a444614 Mon Sep 17 00:00:00 2001 From: ajithvcoder Date: Mon, 4 Nov 2024 16:51:31 +0000 Subject: [PATCH] update workflow --- .github/workflows/ec2-pipeline.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ec2-pipeline.yml b/.github/workflows/ec2-pipeline.yml index 71d2d91..bcdf1d8 100644 --- a/.github/workflows/ec2-pipeline.yml +++ b/.github/workflows/ec2-pipeline.yml @@ -173,6 +173,17 @@ jobs: run: | ls -l ./ + - name: Get latest commit ID from the repository + id: get_commit_id + env: + REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: | + repo="ajithvcoder/emlo4-session-08-ajithvcoder" + latest_commit=$(curl -s -H "Authorization: token $REPO_TOKEN" \ + "https://api.github.com/repos/$repo/commits?per_page=1" | \ + jq -r '.[0].sha') + echo "COMMIT_ID=$latest_commit" >> $GITHUB_ENV + - name: List files in folder run: | ls -l ./model_storage