Skip to content

Commit

Permalink
cicd(Create pipeline #4): Add docker cache
Browse files Browse the repository at this point in the history
  • Loading branch information
raider444 committed Oct 15, 2024
1 parent 35573f8 commit b32bb99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
id: detector
run: |
if $(echo ${{ github.ref_name }} | grep -Pq '[v]?^\d+.\d+.\d+$'); then
echo "image_target=main" >> $GITHUB_OUTPUT
echo "image_target=production" >> $GITHUB_OUTPUT
else
echo "image_target=develop" >> $GITHUB_OUTPUT
fi
Expand All @@ -51,6 +51,8 @@ jobs:
context: .
build-args: |
BOT_VERSION=${{ github.ref_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
target: ${{ steps.detector.outputs.image_target }}
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN poetry build \

ENTRYPOINT [ "psytican-bot" ]

FROM python:3.12 as main
FROM python:3.12 as production

ARG BOT_VERSION

Expand Down

0 comments on commit b32bb99

Please sign in to comment.