Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assets.yml: use actual release tag #3304

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ jobs:
matrix:
arch: [amd64, arm64]
steps:
- name: checkout repo
uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: 0
- name: Force fetch annotated tags (workaround)
# Workaround for https://github.com/actions/checkout/issues/290
run: |
git fetch --force --tags
- name: Determine architecture prefix and ref
env:
REF: ${{ github.event.workflow_run.head_branch }}
Expand All @@ -43,11 +52,7 @@ jobs:
# if the default server is responding -- we can skip apt update
$APT_INSTALL || { sudo apt update && $APT_INSTALL ; }
echo "ARCH=${{ matrix.arch }}" >> "$GITHUB_ENV"
echo "TAG=$(echo "$REF" | sed -e 's#^.*/##' -e 's#master#snapshot#' -e 's#main#snapshot#')" >> "$GITHUB_ENV"
- name: checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
echo "TAG=$(git describe --always --tags | grep -E '[0-9]*\.[0-9]*\.[0-9]*' || echo snapshot) >> "$GITHUB_ENV"
- name: ensure clean assets dir
run : |
rm -rf assets && mkdir -p assets
Expand Down