Skip to content

Commit 9dc923d

Browse files
committed
19th commit
1 parent bd79226 commit 9dc923d

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,45 @@ jobs:
4444
with:
4545
name: build-files
4646
path: dist/
47-
retention-days: 7
47+
retention-days: 14
48+
49+
docker-build:
50+
needs: test-and-build
51+
runs-on: ubuntu-latest
52+
if: github.ref == 'refs/heads/docker'
53+
54+
steps:
55+
- name: Checkout code
56+
uses: actions/checkout@v4
57+
58+
- name: Set up Docker Buildx
59+
uses: docker/setup-buildx-action@v3
60+
61+
- name: Login to Docker Hub
62+
uses: docker/login-action@v3
63+
with:
64+
username: ${{ secrets.DOCKER_USERNAME }}
65+
password: ${{ secrets.DOCKER_PASSWORD }}
66+
67+
- name: Extract metadata
68+
id: meta
69+
uses: docker/metadata-action@v5
70+
with:
71+
images: ${{ secrets.DOCKER_USERNAME }}/vrt-games-website
72+
tags: |
73+
type=ref,event=branch
74+
type=ref,event=pr
75+
type=sha,prefix=main-,suffix=-{{date 'YYYYMMDD'}},enable={{is_default_branch}}
76+
type=raw,value=latest,enable={{is_default_branch}}
77+
78+
- name: Build and push Docker image
79+
uses: docker/build-push-action@v5
80+
with:
81+
context: .
82+
push: true
83+
tags: ${{ steps.meta.outputs.tags }}
84+
labels: ${{ steps.meta.outputs.labels }}
85+
build-args: |
86+
VITE_GEMINI_API_KEY=${{ secrets.VITE_GEMINI_API_KEY }}
87+
cache-from: type=gha
88+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)