Skip to content

Commit 01e1545

Browse files
authored
Merge pull request #26 from MSPRProject/deployment
feat: deployment
2 parents db1db94 + 02e0bd1 commit 01e1545

2 files changed

Lines changed: 47 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deployment pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: sanalyz-front
11+
12+
jobs:
13+
build-and-push-images:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
packages: write
17+
contents: read
18+
attestations: write
19+
id-token: write
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Log in to the Container registry
23+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
24+
with:
25+
registry: ${{ env.REGISTRY }}
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Extract metadata (tags, labels) for Docker
29+
id: meta
30+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
31+
with:
32+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
33+
- name: Build and push Docker image
34+
id: push
35+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
36+
with:
37+
context: .
38+
push: true
39+
tags: ${{ steps.meta.outputs.tags }}
40+
labels: ${{ steps.meta.outputs.labels }}
41+
- name: Generate artifact attestation
42+
uses: actions/attest-build-provenance@v2
43+
with:
44+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
45+
subject-digest: ${{ steps.push.outputs.digest }}
46+
push-to-registry: true

.github/workflows/frontcicd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: '21'
19+
node-version: "21"
2020

2121
- name: Install dependencies
2222
run: npm install

0 commit comments

Comments
 (0)