Skip to content

Commit 7def7b8

Browse files
Refactor GitHub Actions workflow for clarity
1 parent f58531e commit 7def7b8

1 file changed

Lines changed: 29 additions & 34 deletions

File tree

.github/workflows/build-web.yml

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,35 @@
11
name: Build AppFlowy Web GHCR
22

3-
on:
4-
workflow_dispatch:
3+
on:
4+
workflow_dispatch:
55

6-
env:
7-
REGISTRY: ghcr.io
6+
jobs:
7+
build-appflowy-web:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
packages: write
12+
steps:
13+
- name: Checkout AppFlowy-Web
14+
uses: actions/checkout@v4
15+
with:
16+
repository: AppFlowy-IO/AppFlowy-Web
17+
ref: main
818

9-
jobs:
10-
build-appflowy-web:
11-
runs-on: ubuntu-latest
12-
permissions:
13-
contents: read
14-
packages: write
15-
steps:
16-
- name: Checkout AppFlowy-Web
17-
uses: actions/checkout@v4
18-
with:
19-
repository: AppFlowy-IO/AppFlowy-Web
20-
ref: main
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
2121

22-
- name: Set up Docker Buildx
23-
uses: docker/setup-buildx-action@v3
22+
- name: Login to GHCR
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
2428

25-
- name: Login to GHCR
26-
uses: docker/login-action@v3
27-
with:
28-
registry: ${{ env.REGISTRY }}
29-
username: ${{ github.actor }}
30-
password: ${{ secrets.GITHUB_TOKEN }}
31-
32-
- name: Build and push appflowy_web
33-
uses: docker/build-push-action@v5
34-
with:
35-
context: .
36-
file: ./docker/Dockerfile
37-
push: true
38-
tags: ghcr.io/yodev-dev/appflowy_web:latest
39-
cache-from: type=gha
40-
cache-to: type=gha,mode=max
29+
- name: Build and push appflowy_web
30+
uses: docker/build-push-action@v5
31+
with:
32+
context: .
33+
file: ./docker/Dockerfile
34+
push: true
35+
tags: ghcr.io/yodev-dev/appflowy_web:latest

0 commit comments

Comments
 (0)