-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ivica Matic
committed
Oct 25, 2023
1 parent
fc0a7b3
commit 1b7f08f
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
.github/workflows/build_and_push_docker_image_staging.yaml
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,39 @@ | ||
name: Build and push Docker image for staging environment | ||
|
||
permissions: | ||
contents: read | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
docker-build-push-dev: | ||
runs-on: ubuntu-latest | ||
environment: STAGING_ENVIRONMENT | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set Short SHA | ||
run: echo "SHORT_SHA=$(git rev-parse --short=7 $GITHUB_SHA)" >> $GITHUB_ENV | ||
- name: echo Short SHA | ||
run: echo $SHORT_SHA | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.EO_PROJ_STAGING_DOCKER_REGISTRY_URL}} | ||
username: ${{ secrets.EO_PROJ_STAGING_DOCKER_USERNAME }} | ||
password: ${{ secrets.EO_PROJ_STAGING_DOCKER_PASSWORD }} | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build and push Docker image under tag ${{ env.SHORT_SHA }} | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
cache-from: type=registry,ref=${{ secrets.EO_PROJ_STAGING_DOCKER_REGISTRY_URL }}/stac-landing:cache | ||
cache-to: type=registry,ref=${{ secrets.EO_PROJ_STAGING_DOCKER_REGISTRY_URL }}/stac-landing:cache,mode=max | ||
push: true | ||
tags: ${{ secrets.EO_PROJ_STAGING_DOCKER_REGISTRY_URL }}/stac-landing:${{ env.SHORT_SHA }} |
2 changes: 2 additions & 0 deletions
2
.github/workflows/build_and_upload_dist.yaml → ...kflows/build_and_upload_dist_staging.yaml
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