Skip to content

Commit c8542b1

Browse files
authored
Merge pull request #266 from RockefellerArchiveCenter/development
dependency and deploy updates from Development
2 parents af9049d + 133c4c2 commit c8542b1

File tree

4 files changed

+14
-21
lines changed

4 files changed

+14
-21
lines changed

.github/workflows/dependencies.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
ref: development
2121

2222
- name: Set up Python
23-
uses: actions/setup-python@v5.4.0
23+
uses: actions/setup-python@v5.5.0
2424
with:
2525
python-version: '3.11'
2626
cache: pip
@@ -52,7 +52,7 @@ jobs:
5252

5353
- name: Create Pull Request
5454
if: always()
55-
uses: peter-evans/create-pull-request@v7.0.7
55+
uses: peter-evans/create-pull-request@v7.0.8
5656
with:
5757
token: ${{ secrets.ACCESS_TOKEN }}
5858
branch: dependency-updates

.github/workflows/deploy.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,38 +37,31 @@ jobs:
3737
with:
3838
registries: ${{ secrets.ECR_REGISTRIES }}
3939

40-
- name: Set environment variables
40+
- name: Set environment variable for current date
4141
run: |
4242
echo "DATE=$(date +'%Y%m%dT%H%M%S')" >> $GITHUB_ENV
4343
4444
- name: Copy config file
4545
run: cp theme/_config.yml.example theme/config.yml
46-
47-
- name: Build Docker image
48-
run: docker build -t ${{ env.APP_NAME }} .
4946

50-
- name: Tag and push latest to ECR
51-
if: github.ref == 'refs/heads/base'
52-
run: |
53-
docker tag ${{ env.APP_NAME }} "${{ secrets.AWS_ACCOUNT_ID }}".dkr.ecr."${{ secrets.AWS_REGION }}".amazonaws.com/"${{ env.APP_NAME }}":latest
54-
docker push "${{ secrets.AWS_ACCOUNT_ID }}".dkr.ecr."${{ secrets.AWS_REGION }}".amazonaws.com/"${{ env.APP_NAME }}":latest
55-
- name: Tag and push dev to ECR
47+
- name: Build and push Docker images with dev and versioned tags
5648
if: github.ref == 'refs/heads/development'
5749
run: |
50+
docker build -t ${{ env.APP_NAME }} .
5851
docker tag ${{ env.APP_NAME }} "${{ secrets.AWS_ACCOUNT_ID }}".dkr.ecr."${{ secrets.AWS_REGION }}".amazonaws.com/"${{ env.APP_NAME }}":dev
5952
docker push "${{ secrets.AWS_ACCOUNT_ID }}".dkr.ecr."${{ secrets.AWS_REGION }}".amazonaws.com/"${{ env.APP_NAME }}":dev
60-
- name: Tag and push versioned image to ECR
61-
if: github.ref == 'refs/heads/development'
62-
run: |
6353
docker tag ${{ env.APP_NAME }} "${{ secrets.AWS_ACCOUNT_ID }}".dkr.ecr."${{ secrets.AWS_REGION }}".amazonaws.com/"${{ env.APP_NAME }}":"${{ env.DATE }}"-"${{ github.sha }}"
6454
docker push "${{ secrets.AWS_ACCOUNT_ID }}".dkr.ecr."${{ secrets.AWS_REGION }}".amazonaws.com/"${{ env.APP_NAME }}":"${{ env.DATE }}"-"${{ github.sha }}"
65-
- name: Tag image for production (base branch)
55+
56+
- name: Add prod and latest tags to images
6657
if: github.ref == 'refs/heads/base'
6758
run: |
6859
MANIFEST=$(aws ecr batch-get-image --registry-id ${{ secrets.AWS_ACCOUNT_ID }} --repository-name ${{ env.APP_NAME }} --image-ids imageTag=dev --output json | jq -c --join-output '.images[0].imageManifest')
6960
aws ecr put-image --registry-id ${{ secrets.AWS_ACCOUNT_ID }} --repository-name ${{ env.APP_NAME }} --image-tag prod --image-manifest "$MANIFEST"
61+
aws ecr put-image --registry-id ${{ secrets.AWS_ACCOUNT_ID }} --repository-name ${{ env.APP_NAME }} --image-tag latest --image-manifest "$MANIFEST"
62+
7063
- name: Deploy lambda
7164
if: github.ref == 'refs/heads/base'
7265
run: aws lambda update-function-code
7366
--function-name arn:aws:lambda:$AWS_REGION:${{ secrets.AWS_ACCOUNT_ID }}:function:$LAMBDA_NAME
74-
--image-uri ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ env.APP_NAME }}:prod
67+
--image-uri ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ env.APP_NAME }}:prod

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repos:
77
- --in-place
88
- --aggressive
99
- repo: https://github.com/pycqa/flake8
10-
rev: 7.1.2
10+
rev: 7.2.0
1111
hooks:
1212
- id: flake8
1313
- repo: https://github.com/pycqa/isort

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#
55
# pip-compile
66
#
7-
boto3==1.37.5
7+
boto3==1.37.24
88
# via -r requirements.in
9-
botocore==1.37.5
9+
botocore==1.37.24
1010
# via
1111
# boto3
1212
# s3transfer
@@ -18,7 +18,7 @@ python-dateutil==2.9.0.post0
1818
# via botocore
1919
pyyaml==6.0.2
2020
# via -r requirements.in
21-
s3transfer==0.11.3
21+
s3transfer==0.11.4
2222
# via boto3
2323
six==1.17.0
2424
# via python-dateutil

0 commit comments

Comments
 (0)