mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
feat(docker): use github.ref_name variable for image name
This commit is contained in:
parent
46174f652c
commit
65b0a03f97
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
@ -2,6 +2,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@ -16,14 +17,14 @@ jobs:
|
|||||||
- name: Build PostgreSQL container image
|
- name: Build PostgreSQL container image
|
||||||
run: |
|
run: |
|
||||||
docker build --build-arg DATABASE_TYPE=postgresql \
|
docker build --build-arg DATABASE_TYPE=postgresql \
|
||||||
--tag ghcr.io/$GITHUB_ACTOR/umami:postgresql-$(echo $GITHUB_SHA | head -c7) \
|
--tag ghcr.io/$GITHUB_ACTOR/umami:postgresql-${github.ref_name} \
|
||||||
--tag ghcr.io/$GITHUB_ACTOR/umami:postgresql-latest \
|
--tag ghcr.io/$GITHUB_ACTOR/umami:postgresql-latest \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Build MySQL container image
|
- name: Build MySQL container image
|
||||||
run: |
|
run: |
|
||||||
docker build --build-arg DATABASE_TYPE=mysql \
|
docker build --build-arg DATABASE_TYPE=mysql \
|
||||||
--tag ghcr.io/$GITHUB_ACTOR/umami:mysql-$(echo $GITHUB_SHA | head -c7) \
|
--tag ghcr.io/$GITHUB_ACTOR/umami:mysql-${github.ref_name} \
|
||||||
--tag ghcr.io/$GITHUB_ACTOR/umami:mysql-latest \
|
--tag ghcr.io/$GITHUB_ACTOR/umami:mysql-latest \
|
||||||
.
|
.
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# Push each image individually, avoiding pushing to umami:latest
|
# Push each image individually, avoiding pushing to umami:latest
|
||||||
# as MySQL or PostgreSQL are required
|
# as MySQL or PostgreSQL are required
|
||||||
docker push ghcr.io/$GITHUB_ACTOR/umami:postgresql-$(echo $GITHUB_SHA | head -c7)
|
docker push ghcr.io/$GITHUB_ACTOR/umami:postgresql-${github.ref_name}
|
||||||
docker push ghcr.io/$GITHUB_ACTOR/umami:postgresql-latest
|
docker push ghcr.io/$GITHUB_ACTOR/umami:postgresql-latest
|
||||||
docker push ghcr.io/$GITHUB_ACTOR/umami:mysql-$(echo $GITHUB_SHA | head -c7)
|
docker push ghcr.io/$GITHUB_ACTOR/umami:mysql-${github.ref_name}
|
||||||
docker push ghcr.io/$GITHUB_ACTOR/umami:mysql-latest
|
docker push ghcr.io/$GITHUB_ACTOR/umami:mysql-latest
|
||||||
|
Loading…
Reference in New Issue
Block a user