Skip to content

Deploy To Development #18

Deploy To Development

Deploy To Development #18

Workflow file for this run

name: Deploy To Development
on: [workflow_dispatch]
jobs:
deploy:
runs-on: ubuntu-latest
env:
DOCKER_REPO: ${{ secrets.DEPLOY_DOCKER_REPOSITORY }}
environment: development
steps:
- uses: actions/checkout@v4
- id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.DEPLOY_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DEPLOY_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
- uses: aws-actions/amazon-ecr-login@v1
- run: docker pull $DOCKER_REPO:latest || echo "no current latest image"
- run: docker build -t $DOCKER_REPO:${{ steps.vars.outputs.sha_short }} .
working-directory: ./task
- run: docker tag $DOCKER_REPO:${{ steps.vars.outputs.sha_short }} $DOCKER_REPO:latest
- run: docker push $DOCKER_REPO:${{ steps.vars.outputs.sha_short }}
- run: docker push $DOCKER_REPO:latest