Skip to content

Commit b1831c8

Browse files
author
Ivica Matic
committed
feat: added build action for releases
1 parent 90ae2bf commit b1831c8

File tree

3 files changed

+29
-79
lines changed

3 files changed

+29
-79
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build docker images on release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build-and-push-docker-image:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: docker/login-action@v2
13+
name: Log in to the Container registry
14+
with:
15+
registry: ${{ secrets.EO_PROJ_DOCKER_LOGIN_SERVER}}
16+
username: ${{ secrets.EO_PROJ_DOCKER_USERNAME }}
17+
password: ${{ secrets.EO_PROJ_DOCKER_PASSWORD }}
18+
- uses: docker/setup-buildx-action@v2
19+
name: Set up Docker Buildx
20+
id: buildx
21+
- uses: docker/build-push-action@v4
22+
name: Build and push Docker image
23+
with:
24+
context: .
25+
file: Dockerfile
26+
cache-from: type=registry,ref=${{ secrets.EO_PROJ_DOCKER_LOGIN_SERVER }}/stac-fastapi-pgstac-apim-documentation:cache
27+
cache-to: type=registry,ref=${{ secrets.EO_PROJ_DOCKER_LOGIN_SERVER }}/stac-fastapi-pgstac-apim-documentation:cache,mode=max
28+
push: true
29+
tags: ${{ secrets.EO_PROJ_DOCKER_LOGIN_SERVER }}/stac-fastapi-pgstac-apim-documentation:${{ github.event.release.tag_name }}

.github/workflows/docker-build-prod.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/docker-build-staging.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)