Skip to content

Commit 86f3aa2

Browse files
committed
Workflow: split jobs for images
1 parent 156b136 commit 86f3aa2

File tree

1 file changed

+34
-9
lines changed

1 file changed

+34
-9
lines changed

.github/workflows/docker.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
IMAGE_NAME: linuxserver-mods
1212

1313
jobs:
14-
docker:
14+
freshrss-extensions:
1515
runs-on: ubuntu-latest
1616

1717
steps:
@@ -34,12 +34,10 @@ jobs:
3434
uses: docker/metadata-action@v5
3535
with:
3636
images: ${{ env.REGISTRY }}/${{ env.IMAGE_AUTHOR }}/${{ env.IMAGE_NAME }}
37-
tags: |
38-
freshrss-extensions
39-
freshrss-redditimage
37+
tags: freshrss-extensions
4038

41-
- name: Build freshrss-extensions and push it to ${{ env.REGISTRY }}
42-
id: build-and-push-freshrss-extensions
39+
- name: Build and push it to ${{ env.REGISTRY }}
40+
id: build-and-push
4341
uses: docker/build-push-action@v5
4442
with:
4543
context: ./freshrss-extensions
@@ -50,8 +48,34 @@ jobs:
5048
cache-to: type=gha,mode=max
5149
push: ${{ github.ref == 'refs/heads/main' }}
5250

53-
- name: Build freshrss-redditimage and push it to ${{ env.REGISTRY }}
54-
id: build-and-push-freshrss-redditimage
51+
52+
freshrss-redditimage:
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v4
58+
59+
- name: Setup Docker buildx
60+
uses: docker/setup-buildx-action@v3
61+
62+
- name: Log into registry ${{ env.REGISTRY }}
63+
if: ${{ github.ref == 'refs/heads/main' }}
64+
uses: docker/login-action@v3
65+
with:
66+
registry: ${{ env.REGISTRY }}
67+
username: ${{ github.actor }}
68+
password: ${{ secrets.GITHUB_TOKEN }}
69+
70+
- name: Extract Docker metadata
71+
id: meta
72+
uses: docker/metadata-action@v5
73+
with:
74+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_AUTHOR }}/${{ env.IMAGE_NAME }}
75+
tags: freshrss-redditimage
76+
77+
- name: Build and push it to ${{ env.REGISTRY }}
78+
id: build-and-push
5579
uses: docker/build-push-action@v5
5680
with:
5781
context: ./freshrss-redditimage
@@ -62,8 +86,9 @@ jobs:
6286
cache-to: type=gha,mode=max
6387
push: ${{ github.ref == 'refs/heads/main' }}
6488

89+
6590
prune:
66-
needs: [docker]
91+
needs: [freshrss-extensions, freshrss-redditimage]
6792
runs-on: ubuntu-latest
6893

6994
steps:

0 commit comments

Comments
 (0)