Skip to content

Commit f5c2263

Browse files
authored
Update Prebuild.yaml
1 parent e0eea69 commit f5c2263

File tree

1 file changed

+18
-52
lines changed

1 file changed

+18
-52
lines changed

.github/workflows/Prebuild.yaml

Lines changed: 18 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ env:
88

99
jobs:
1010
production:
11-
name: "Production"
12-
runs-on: ubuntu-latest
11+
name: 'Production'
12+
runs-on: ubuntu-24.04-arm
1313
permissions:
1414
packages: write
1515
steps:
@@ -24,45 +24,29 @@ jobs:
2424
uses: docker/metadata-action@v4
2525
with:
2626
images: ${{ env.REGISTRY }}/${{ github.repository }}
27+
tags: |
28+
type=ref,event=branch
29+
type=ref,event=tag
30+
# Set latest tag for default branch
31+
type=raw,value=latest,enable={{is_default_branch}}
2732
28-
- name: "Login to GitHub Container Registry"
33+
- name: 'Login to GitHub Container Registry'
2934
uses: docker/login-action@v3
3035
with:
3136
registry: ${{ env.REGISTRY }}
3237
username: ${{ github.actor }}
3338
password: ${{ secrets.GITHUB_TOKEN }}
3439

35-
- name: Set tags
36-
id: set-tags
37-
run: |
38-
TAGS="${{ steps.meta.outputs.tags }}"
39-
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
40-
TAGS="${TAGS},${{ env.REGISTRY }}/${{ github.repository }}:latest"
41-
fi
42-
echo "tags=$TAGS" >> $GITHUB_ENV
43-
44-
- name: Debug build context
45-
run: |
46-
echo "Checking list of files:"
47-
ls -a
48-
4940
- name: Build and push
5041
uses: docker/build-push-action@v6
5142
with:
5243
push: ${{ github.event_name != 'pull_request' }}
5344
platforms: linux/arm64
54-
tags: ${{ env.tags }}
45+
tags: ${{ steps.meta.outputs.tags }}
5546
labels: ${{ steps.meta.outputs.labels }}
5647

57-
- name: Debug on failure
58-
if: ${{ failure() }}
59-
run: |
60-
echo "Build failed. Checking for intermediate files..."
61-
docker buildx ls
62-
docker images -a
63-
6448
development:
65-
name: "Development"
49+
name: 'Development'
6650
runs-on: ubuntu-latest
6751
permissions:
6852
packages: write
@@ -78,44 +62,26 @@ jobs:
7862
uses: docker/metadata-action@v4
7963
with:
8064
images: ${{ env.REGISTRY }}/${{ github.repository }}
65+
tags: |
66+
type=ref,event=branch
67+
type=ref,event=tag
68+
# Set latest tag for default branch
69+
type=raw,value=latest,enable={{is_default_branch}}
8170
flavor: |
82-
suffix=-dev.
71+
suffix=-dev.,onlatest=true
8372
84-
- name: "Login to GitHub Container Registry"
73+
- name: 'Login to GitHub Container Registry'
8574
uses: docker/login-action@v3
8675
with:
8776
registry: ${{ env.REGISTRY }}
8877
username: ${{ github.actor }}
8978
password: ${{ secrets.GITHUB_TOKEN }}
9079

91-
- name: Set tags
92-
id: set-tags
93-
run: |
94-
TAGS="${{ steps.meta.outputs.tags }}"
95-
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
96-
TAGS="${TAGS},${{ env.REGISTRY }}/${{ github.repository }}:latest"
97-
fi
98-
echo "tags=$TAGS" >> $GITHUB_ENV
99-
100-
- name: Debug build context
101-
run: |
102-
echo "Checking list of files:"
103-
ls -a
104-
10580
- name: Build and push
10681
uses: docker/build-push-action@v6
10782
with:
10883
file: Dockerfile.dev
10984
push: ${{ github.event_name != 'pull_request' }}
11085
platforms: linux/arm64
111-
tags: ${{ env.tags }}
86+
tags: ${{ steps.meta.outputs.tags }}
11287
labels: ${{ steps.meta.outputs.labels }}
113-
build-args: |
114-
BUILDKIT_PROGRESS=plain
115-
116-
- name: Debug on failure
117-
if: ${{ failure() }}
118-
run: |
119-
echo "Build failed. Checking for intermediate files..."
120-
docker buildx ls
121-
docker images -a

0 commit comments

Comments
 (0)