Skip to content

Commit 69bbe60

Browse files
authored
Split image build processes (alexjustesen#205)
1 parent eb69962 commit 69bbe60

File tree

4 files changed

+64
-26
lines changed

4 files changed

+64
-26
lines changed
Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# To get a newer version, you will need to update the SHA.
88
# You can also reference a tag or branch, but the action may change without warning.
99

10-
name: Create and publish a Docker image
10+
name: Build and push Docker image to Docker Hub
1111

1212
on:
1313
workflow_dispatch:
@@ -16,13 +16,11 @@ on:
1616
types: [ published ]
1717

1818
env:
19-
REGISTRY: ghcr.io
2019
IMAGE_NAME: ${{ github.repository }}
2120
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
2221

2322
jobs:
2423
build_and_push_image:
25-
name: Build and push Docker image
2624
runs-on: ubuntu-22.04
2725
permissions:
2826
contents: read
@@ -49,29 +47,14 @@ jobs:
4947
id: meta
5048
uses: docker/metadata-action@v4
5149
with:
52-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
53-
54-
- name: Build and push image to GHCR
55-
uses: docker/build-push-action@v3
56-
with:
57-
context: .
58-
push: true
59-
platforms: ${{ env.PLATFORMS }}
60-
tags: ${{ steps.meta.outputs.tags }}
61-
labels: ${{ steps.meta.outputs.labels }}
50+
images: ajustesen/${{ env.IMAGE_NAME }}
6251

6352
- name: Log in to Docker Hub
6453
uses: docker/login-action@v2
6554
with:
6655
username: ${{ secrets.DOCKER_USERNAME }}
6756
password: ${{ secrets.DOCKER_PASSWORD }}
6857

69-
- name: Extract metadata (tags, labels) for Docker
70-
id: meta
71-
uses: docker/metadata-action@v4
72-
with:
73-
images: ajustesen/${{ env.IMAGE_NAME }}
74-
7558
- name: Build and push image to Docker Hub
7659
uses: docker/build-push-action@v3
7760
with:

.github/workflows/cd-ghcr.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# To get a newer version, you will need to update the SHA.
8+
# You can also reference a tag or branch, but the action may change without warning.
9+
10+
name: Build and push Docker image to GHCR
11+
12+
on:
13+
workflow_dispatch:
14+
release:
15+
branches: [ main ]
16+
types: [ published ]
17+
18+
env:
19+
REGISTRY: ghcr.io
20+
IMAGE_NAME: ${{ github.repository }}
21+
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
22+
23+
jobs:
24+
build_and_push_image:
25+
runs-on: ubuntu-22.04
26+
permissions:
27+
contents: read
28+
packages: write
29+
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v3
33+
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v2
36+
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v2
39+
40+
- name: Log in to the Container registry
41+
uses: docker/login-action@v2
42+
with:
43+
registry: ${{ env.REGISTRY }}
44+
username: ${{ github.actor }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Extract metadata (tags, labels) for Docker
48+
id: meta
49+
uses: docker/metadata-action@v4
50+
with:
51+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
52+
53+
- name: Build and push image to GHCR
54+
uses: docker/build-push-action@v3
55+
with:
56+
context: .
57+
push: true
58+
platforms: ${{ env.PLATFORMS }}
59+
tags: ${{ steps.meta.outputs.tags }}
60+
labels: ${{ steps.meta.outputs.labels }}

app/Providers/FilamentServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function boot()
3232
return true;
3333
});
3434

35-
FilamentVersions::addItem('Speedtest Tracker', 'v0.5.0');
35+
FilamentVersions::addItem('Speedtest Tracker', 'v0.6.1');
3636

3737
Filament::serving(function () {
3838
Filament::registerNavigationGroups([

docker/8.1/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
1515

1616
RUN apt-get update \
1717
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 cron \
18-
&& mkdir -p ~/.gnupg \
19-
&& chmod 600 ~/.gnupg \
20-
&& echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \
21-
&& echo "keyserver hkp://keyserver.ubuntu.com:80" >> ~/.gnupg/dirmngr.conf \
22-
&& gpg --recv-key 0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c \
23-
&& gpg --export 0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c > /usr/share/keyrings/ppa_ondrej_php.gpg \
18+
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /usr/share/keyrings/ppa_ondrej_php.gpg > /dev/null \
2419
&& echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
2520
&& apt-get update \
2621
&& apt-get install -y php8.1-cli php8.1-dev \

0 commit comments

Comments
 (0)