We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62ce03a commit ed09e0fCopy full SHA for ed09e0f
.github/workflows/build-and-push-image.yml
@@ -0,0 +1,23 @@
1
+name: CI
2
+on: [push]
3
+
4
+jobs:
5
+ build-and-push-image:
6
+ runs-on: ubuntu-latest
7
+ env:
8
+ IMAGE_NAME: "oc4ids-datastore-api"
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+ - name: Login to GitHub Container Registry
12
+ uses: docker/login-action@v3
13
+ with:
14
+ registry: ghcr.io
15
+ username: ${{ github.actor }}
16
+ password: ${{ secrets.GITHUB_TOKEN }}
17
+ - name: Build and push image
18
+ run: |
19
+ IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
20
+ IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
21
+ echo $IMAGE_ID
22
+ docker build . -t ${IMAGE_ID}
23
+ docker push ${IMAGE_ID}:latest
0 commit comments