Skip to content

Commit

Permalink
ci: Updte
Browse files Browse the repository at this point in the history
  • Loading branch information
Terre8055 committed Oct 20, 2024
1 parent aff62aa commit ac6a3a7
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 54 deletions.
35 changes: 28 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,38 @@ jobs:
echo "Upload env variables to s3..."
aws s3 cp .env s3://${{ env.S3_BUCKET }}
- name: Build, tag, and push image to Amazon ECR
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2


- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.ref }}
restore-keys: |
${{ runner.os }}-buildx-${{ github.ref }}
${{ runner.os }}-buildx
- name: Build and push image to ECR
id: build-image
uses: docker/build-push-action@v6
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ env.ECR_REPO }}
IMAGE_TAG: ${{ steps.versioning.outputs.new_version }}
run: |
ls -al
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:latest
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
with:
context: .
push: true
builder: ${{ steps.buildx.outputs.name }}
tags: |
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Clean up
if: always()
Expand Down
92 changes: 45 additions & 47 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
alabaster==0.7.13
annotated-types==0.5.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
async-timeout==4.0.3
Babel==2.12.1
blinker==1.8.2
boto3==1.34.144
botocore==1.34.144
certifi==2023.7.22
cffi==1.16.0
charset-normalizer==3.3.0
click==8.1.7
cryptography==41.0.4
docutils==0.18.1
Flask==3.0.3
hiredis==2.2.3
idna==3.4
imagesize==1.4.1
itsdangerous==2.2.0
Jinja2==3.1.2
jmespath==1.0.1
MarkupSafe==2.1.3
more-itertools==9.1.0
mypy==1.5.1
mypy-extensions==1.0.0
packaging==23.1
pycparser==2.21
pydantic==2.0.3
pydantic_core==2.3.0
Pygments==2.16.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.0
python-ulid==1.1.0
redis==4.6.0
redis-om==0.2.1
requests==2.31.0
s3transfer==0.10.2
shortuuid==1.0.11
six==1.16.0
snowballstemmer==2.2.0
tomli==2.0.1
types-pyOpenSSL==23.2.0.2
types-redis==4.6.0.7
typing_extensions==4.8.0
urllib3==2.0.5
Werkzeug==3.0.4
alabaster
annotated-types
argon2-cffi
argon2-cffi-bindings
async-timeout
Babel
blinker
boto3
botocore
certifi
cffi
charset-normalizer
click
cryptography
docutils
Flask
hiredis
idna
imagesize
itsdangerous
Jinja2
jmespath
MarkupSafe
more-itertools
mypy-extensions
packaging
pycparser
pydantic
pydantic_core
Pygments
python-dateutil
python-dotenv
python-ulid
redis
redis-om
requests
s3transfer
shortuuid
six
snowballstemmer
tomli
types-pyOpenSSL
types-redis
typing_extensions
Werkzeug

0 comments on commit ac6a3a7

Please sign in to comment.