-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
trigger preview image build on tag #6933
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,14 @@ on: | |
- Tests | ||
types: | ||
- completed | ||
branches: | ||
- master | ||
|
||
env: | ||
DOCKER_REPO: redash | ||
|
||
jobs: | ||
build-skip-check: | ||
runs-on: ubuntu-22.04 | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
if: ${{ github.event.workflow_run.conclusion == 'success' && (endsWith(github.event.workflow_run.head_branch, '-dev') || startsWith(github.event.workflow_run.head_branch, 'master')) }} | ||
outputs: | ||
skip: ${{ steps.skip-check.outputs.skip }} | ||
steps: | ||
|
@@ -71,7 +69,12 @@ jobs: | |
run: | | ||
set -x | ||
VERSION=$(jq -r .version package.json) | ||
FULL_VERSION=${VERSION}-b${GITHUB_RUN_ID}.${GITHUB_RUN_NUMBER} | ||
BRANCH=${{ event.workflow_run.head_branch }} | ||
if [[ "$BRANCH" =~ ^[0-9]+\.[0-9]+\.[0-9]+\-dev ]]; then | ||
FULL_VERSION=${VERSION} | ||
else | ||
FULL_VERSION=${VERSION}-b${GITHUB_RUN_ID}.${GITHUB_RUN_NUMBER} | ||
fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @eradman Reading over these lines here, doesn't the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously the trigger condition was based on a single condition name: Preview Image
on:
push:
tags:
- '*-dev' This made the entire workflow easy to reason about. I don't know what will happen when the workflow is run; needs to be tested in a private repository. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's needed to:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That raises an interesting point. GitHub Actions added M1 based macOS runners a few months ago. Wonder if means we could build ARM64 images natively using those? Might be too much hassle to try and figure that out though. Not sure. 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it doesn't solve a problem, still emulation is required |
||
sed -ri "s/^__version__ = ([A-Za-z0-9.-]*)'/__version__ = '${FULL_VERSION}'/" redash/__init__.py | ||
sed -i "s/dev/${GITHUB_SHA}/" client/app/version.json | ||
echo "VERSION_TAG=$FULL_VERSION" >> "$GITHUB_OUTPUT" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this what we want? This used to be the short SHA of the commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's what it used to be
you can check images, that i've published during testing in a fork
https://hub.docker.com/r/achubatiuk/preview/tags