From 0c73962fb4dc5146c2d147dabf0162ed7b51a740 Mon Sep 17 00:00:00 2001 From: Colin Sullender Date: Thu, 23 Mar 2023 09:11:27 -0400 Subject: [PATCH] Simplify checking out latest release --- .github/workflows/get_context.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/get_context.yml b/.github/workflows/get_context.yml index 10fbc08..f75feed 100644 --- a/.github/workflows/get_context.yml +++ b/.github/workflows/get_context.yml @@ -11,21 +11,22 @@ jobs: runs-on: ubuntu-latest environment: mastodon steps: - - name: Get latest release - run: | - curl --retry 20 -s https://api.github.com/repos/nanos/mastodon_get_replies/releases/latest | jq .zipball_url | xargs wget -O download.zip - unzip -j download.zip - mkdir artifacts - ls -lR + - name: Checkout repository + uses: actions/checkout@v3 + with: + repository: nanos/mastodon_get_replies + fetch-depth: 0 + - name: Checkout latest release tag + run: git checkout $(git describe --tags) - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.10' cache: 'pip' # caching pip dependencies - run: pip install -r requirements.txt - name: Download all workflow run artifacts uses: dawidd6/action-download-artifact@v2 - with: + with: name: artifacts workflow: get_context.yml if_no_artifact_found: warn @@ -39,7 +40,7 @@ jobs: name: artifacts path: | artifacts - - name: Check out, so that we can keep the workflow alive - uses: actions/checkout@v3 + - name: Swap back to main branch for keeping workflow alive + run: git checkout main - name: Keep workflow alive uses: gautamkrishnar/keepalive-workflow@v1