Skip to content

Commit

Permalink
update workflow actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nsheff committed Jan 16, 2024
1 parent 88ba230 commit c920b2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/deploy-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
workflow_dispatch:
inputs: null

name: Deploy pephub.databio.org API to AWS - primary
name: Deploy API to AWS - primary

jobs:
deploy:
Expand All @@ -40,7 +40,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -55,16 +56,13 @@ jobs:
- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: pephub
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: pephub
IMAGE_TAG: ${{ github.sha }}
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG deployment/pephub.databio.org/.
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f deployment/pephub.databio.org/Dockerfile .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
echo "image=$REGISTRY/$REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/deploy-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
context: '{{defaultContext}}:mysubdir'
tags: databio/pephub:latest
context: '{{defaultContext}}:deployment/Dockerhub'
tags:
- databio/pephub:latest
- databio/pephub:${{github.ref_name}}

0 comments on commit c920b2c

Please sign in to comment.