Skip to content

Commit 026853a

Browse files
committed
init
1 parent a71e885 commit 026853a

15 files changed

+278
-4
lines changed

.github/workflows/docker.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
9+
permissions:
10+
contents: read
11+
packages: write
12+
13+
jobs:
14+
build-amd64:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: downcase REPO
19+
run: |
20+
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
21+
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
27+
28+
- name: Login to GitHub Container Registry
29+
uses: docker/login-action@v3
30+
with:
31+
registry: ghcr.io
32+
username: ${{ github.repository_owner }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Build and push (AMD64)
36+
uses: docker/build-push-action@v6
37+
with:
38+
platforms: linux/amd64
39+
context: .
40+
push: true
41+
tags: |
42+
ghcr.io/${{ env.REPO }}:latest-amd
43+
ghcr.io/${{ env.REPO }}:${{ github.sha }}-amd
44+
cache-from: type=gha
45+
cache-to: type=gha,mode=max
46+
47+
build-merge:
48+
runs-on: ubuntu-latest
49+
50+
needs:
51+
- build-amd64
52+
53+
steps:
54+
- name: downcase REPO
55+
run: |
56+
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
57+
58+
- name: Set up Docker Buildx
59+
uses: docker/setup-buildx-action@v3
60+
61+
- name: Login to GHCR
62+
uses: docker/login-action@v3
63+
with:
64+
registry: ghcr.io
65+
username: ${{ github.repository_owner }}
66+
password: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Merge
69+
run: |
70+
docker buildx imagetools create -t ghcr.io/${{ env.REPO }}:latest \
71+
ghcr.io/${{ env.REPO }}:latest-amd

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ yarn-error.log*
2929
.env.development.local
3030
.env.test.local
3131
.env.production.local
32+
.env
3233

3334
# vercel
3435
.vercel

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copilot.data.migration.agent.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copilot.data.migration.ask.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copilot.data.migration.ask2agent.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copilot.data.migration.edit.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/discord.xml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/image-server.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)