Skip to content

Commit feca005

Browse files
committed
build docker images after tests workflow completed, change tag name, remove arm64
1 parent 211624b commit feca005

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/workflows/preview-image.yml

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
name: Preview Image
22
on:
3-
push:
4-
tags:
5-
- '*-dev'
3+
workflow_run:
4+
workflows:
5+
- Tests
6+
types:
7+
- completed
8+
branches:
9+
- master
610
workflow_dispatch:
711
inputs:
812
dockerRepository:
@@ -45,12 +49,9 @@ jobs:
4549
matrix:
4650
arch:
4751
- amd64
48-
- arm64
4952
include:
5053
- arch: amd64
5154
os: ubuntu-22.04
52-
- arch: arm64
53-
os: ubuntu-22.04-arm
5455
outputs:
5556
VERSION_TAG: ${{ steps.version.outputs.VERSION_TAG }}
5657
needs:
@@ -94,11 +95,11 @@ jobs:
9495
- name: Build and push preview image to Docker Hub
9596
id: build-preview
9697
uses: docker/build-push-action@v4
97-
if: ${{ github.event.inputs.dockerRepository == 'preview' || !github.event.workflow_run }}
98+
if: ${{ github.event.inputs.dockerRepository == 'preview' || github.event.workflow_run }}
9899
with:
99100
tags: |
100101
${{ vars.DOCKER_USER }}/redash
101-
${{ vars.DOCKER_USER }}/preview
102+
${{ vars.DOCKER_USER }}/redash_preview
102103
context: .
103104
build-args: |
104105
test_all_deps=true
@@ -171,8 +172,8 @@ jobs:
171172
run: |
172173
docker buildx imagetools create -t ${{ vars.DOCKER_USER }}/redash:preview \
173174
$(printf '${{ vars.DOCKER_USER }}/redash:preview@sha256:%s ' *)
174-
docker buildx imagetools create -t ${{ vars.DOCKER_USER }}/preview:${{ needs.build-docker-image.outputs.VERSION_TAG }} \
175-
$(printf '${{ vars.DOCKER_USER }}/preview:${{ needs.build-docker-image.outputs.VERSION_TAG }}@sha256:%s ' *)
175+
docker buildx imagetools create -t ${{ vars.DOCKER_USER }}/redash_preview:${{ needs.build-docker-image.outputs.VERSION_TAG }} \
176+
$(printf '${{ vars.DOCKER_USER }}/redash_preview:${{ needs.build-docker-image.outputs.VERSION_TAG }}@sha256:%s ' *)
176177
177178
- name: Create and push manifest for the release image
178179
if: ${{ github.event.inputs.dockerRepository == 'redash' }}

0 commit comments

Comments
 (0)