Skip to content

Commit 9c99865

Browse files
committed
wip
1 parent e327025 commit 9c99865

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/build-interface.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,25 @@ on:
44
push:
55
branches:
66
- main
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
710

811
jobs:
912
build-docker:
1013
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
attestations: write
18+
id-token: write
1119
steps:
20+
- name: Log in to the Container registry
21+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
22+
with:
23+
registry: ${{ env.REGISTRY }}
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
1226
- name: Checkout repository
1327
uses: actions/checkout@v3
1428
- name: Set up Node.js
@@ -89,5 +103,17 @@ jobs:
89103
unzip artifact.zip -d docker-build/lingodb-binaries
90104
91105
echo "Artifact extracted to docker-build directory."
92-
- name: Build docker
93-
run: docker build -t lingodb-webinterface .
106+
- name: Build and push Docker image
107+
id: push
108+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
109+
with:
110+
context: .
111+
push: true
112+
tags: lingo-db/webinterface:latest, lingo-db/webinterface:${{ github.sha }}
113+
- name: Generate artifact attestation
114+
uses: actions/attest-build-provenance@v2
115+
with:
116+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
117+
subject-digest: ${{ steps.push.outputs.digest }}
118+
push-to-registry: true
119+

0 commit comments

Comments
 (0)