Skip to content

Commit

Permalink
feat: added github action on release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivica Matic committed Apr 4, 2024
1 parent c873797 commit 5530788
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 106 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build-docker-images-on-release.yml
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 }}
53 changes: 0 additions & 53 deletions .github/workflows/docker-build-prod.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/docker-build-staging.yml

This file was deleted.

0 comments on commit 5530788

Please sign in to comment.