Skip to content

Commit 390be35

Browse files
committed
HOURS WASTED ON EDITING YAML WHEN I COULD BE DOING SOMETHING PRODUCTIVE
1 parent 9e91f56 commit 390be35

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/build-and-push.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: ci
22

33
on:
44
push:
5+
branches:
6+
- 'coolify'
57

68
jobs:
79
docker:
@@ -18,6 +20,17 @@ jobs:
1820
run: |
1921
echo "path=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
2022
23+
- name: Docker meta
24+
id: meta
25+
uses: docker/metadata-action@v5
26+
with:
27+
# list of Docker images to use as base name for tags
28+
images: ${{ steps.image-path.outputs.path }}
29+
# generate Docker tags based on the following events/attributes
30+
tags: |
31+
type=ref,event=branch
32+
type=sha
33+
2134
- name: Set up QEMU
2235
uses: docker/setup-qemu-action@v3
2336

@@ -27,7 +40,9 @@ jobs:
2740
- name: Build and push
2841
uses: docker/build-push-action@v6
2942
with:
30-
platforms: linux/amd64,linux/arm64
43+
platforms: linux/amd64
3144
push: true
32-
tags: |
33-
ghcr.io/${{ steps.image-path.outputs.path }}:latest
45+
cache-from: type=gha
46+
cache-to: type=gha,mode=max
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)