Skip to content

Commit

Permalink
chore: move metadata generation next to build
Browse files Browse the repository at this point in the history
It exposes environment as well, so make sure these are not mixed.
  • Loading branch information
nijel committed Nov 8, 2024
1 parent d93c5ec commit 3933e4e
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,6 @@ jobs:
type=edge,branch=main
type=sha,format=long
- name: Docker meta (dev)
id: dev
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
weblate/dev
ghcr.io/weblateorg/dev
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=edge,branch=main
type=sha,format=long
- name: Build and push (base)
uses: docker/build-push-action@v6
Expand All @@ -107,6 +89,25 @@ jobs:
load: true
cache-from: type=gha

- name: Docker meta (dev)
id: dev
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
weblate/dev
ghcr.io/weblateorg/dev
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=edge,branch=main
type=sha,format=long
- name: Build and push (dev)
uses: docker/build-push-action@v6
with:
Expand Down

0 comments on commit 3933e4e

Please sign in to comment.