Skip to content

Commit

Permalink
test the cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostas Demiris committed Mar 28, 2024
1 parent 25a6c7d commit 55202c2
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 276 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build_the_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
build_the_image:
# This is a separate action that sets up buildx runner
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

# So now you can use Actions' own caching!
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-single-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-single-buildx
# And make it available for builds
- name: Build image
uses: docker/build-push-action@v2
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
file: Dockerfile
build-args: AWS_ECR_URL=${{ steps.login-ecr.outputs.registry }}
platforms: linux/amd64
tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
push: true # set false to deactivate the push to ECR

# This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB.
# https://github.com/docker/build-push-action/issues/252 & https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
275 changes: 0 additions & 275 deletions .github/workflows/cicd_develop_indexer.yaml

This file was deleted.

Loading

0 comments on commit 55202c2

Please sign in to comment.