-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added github action on release
- Loading branch information
Ivica Matic
committed
Apr 4, 2024
1 parent
c873797
commit 5530788
Showing
3 changed files
with
41 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build docker images on release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build-and-push-docker-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the main repository | ||
- name: Checkout main repo | ||
uses: actions/checkout@v3 | ||
|
||
# Checkout the inner repository (nested git repo) | ||
- name: Checkout stac-proprietary-parsers repo | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: SpatialDays/stac-proprietary-parsers | ||
token: ${{ secrets.GH_PAT }} | ||
path: app/stac/services/metadata_parsers/proprietary | ||
|
||
# Log in to the Container registry | ||
- uses: docker/login-action@v2 | ||
name: Log in to the Container registry | ||
with: | ||
registry: ${{ secrets.EO_PROJ_DOCKER_LOGIN_SERVER}} | ||
username: ${{ secrets.EO_PROJ_DOCKER_USERNAME }} | ||
password: ${{ secrets.EO_PROJ_DOCKER_PASSWORD }} | ||
- uses: docker/setup-buildx-action@v2 | ||
name: Set up Docker Buildx | ||
id: buildx | ||
- uses: docker/build-push-action@v4 | ||
name: Build and push Docker image | ||
with: | ||
context: . | ||
file: Dockerfile | ||
cache-from: type=registry,ref=${{ secrets.EO_PROJ_DOCKER_LOGIN_SERVER }}/${{ github.event.repository.name }}:cache | ||
cache-to: type=registry,ref=${{ secrets.EO_PROJ_DOCKER_LOGIN_SERVER }}/${{ github.event.repository.name }}:cache,mode=max | ||
push: true | ||
tags: ${{ secrets.EO_PROJ_DOCKER_LOGIN_SERVER }}/${{ github.event.repository.name }}:${{ github.event.release.tag_name }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.