Skip to content

Commit f647b23

Browse files
authored
Create docker-image.yml (#561)
* Move debug contexts params to config (#552) * Create docker-image.yml * Update docker-image.yml * Update docker-image.yml * Update Dockerfile * Update Dockerfile
1 parent 9352045 commit f647b23

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

.github/workflows/docker-image.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches:
6+
- 'patch-2'
7+
8+
release:
9+
types: [published]
10+
11+
permissions:
12+
packages: write
13+
contents: read
14+
15+
jobs:
16+
build-main:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Set up QEMU
20+
uses: docker/setup-qemu-action@v3
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Login to Github Container Registry
26+
uses: docker/login-action@v3
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.repository_owner }}
30+
password: ${{ github.token }}
31+
32+
- name: Generate Docker tags
33+
uses: docker/metadata-action@v5
34+
id: metadata
35+
with:
36+
images: ghcr.io/${{ github.repository }}
37+
tags: |
38+
type=sha,format=long,prefix=
39+
flavor: |
40+
latest=true
41+
42+
- name: Build and push
43+
uses: docker/build-push-action@v5
44+
with:
45+
platforms: linux/amd64,linux/arm64
46+
push: true
47+
tags: ${{ steps.metadata.outputs.tags }}
48+
labels: ${{ steps.metadata.outputs.labels }}
49+
cache-from: type=gha
50+
cache-to: type=gha,mode=max

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN yarn install --pure-lockfile --production
1818

1919
COPY . /iframely
2020

21-
RUN chown -R iframely /iframely/config.local.js
21+
RUN chown -R iframely /iframely/config.local.js || touch /iframely/config.local.js
2222

2323
USER iframely
2424

0 commit comments

Comments
 (0)