Skip to content

Commit

Permalink
testing action
Browse files Browse the repository at this point in the history
  • Loading branch information
crypticmeta committed Aug 30, 2024
1 parent abe87e9 commit 3cc3013
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/build_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,26 @@ jobs:
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build ordapi image
run: |
docker build \
-t ${{ env.IMAGE_NAME }} . \
--build-arg MONGODB_URI=${{ secrets.MONGODB_URI }}
- name: Log in to Docker registry
run: docker login -u crypticmetadev -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: crypticmetadev
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Push image to Docker registry
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ env.IMAGE_NAME }}
build-args: |
MONGODB_URI=${{ secrets.MONGODB_URI }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new


- name: Move cache
run: |
docker push ${{ env.IMAGE_NAME }}
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

0 comments on commit 3cc3013

Please sign in to comment.