Skip to content

chore: drop private zone record #142

chore: drop private zone record

chore: drop private zone record #142

Workflow file for this run

name: Deployment
# Only a single deployment workflow will run at a time.
concurrency:
group: todoist-google-sheets
on:
push:
branches:
- 'main'
permissions:
id-token: write
contents: read
env:
INTEGRATION: todoist-google-sheets
ENV: production
AWS_REGION: us-east-1
AWS_ROLE: 'arn:aws:iam::011833101604:role/todoist-google-sheets-production-GitHubRoleCI-HWJ5P5W2PLOB'
jobs:
build:
name: Build Docker Image
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.4.0
- run: |
echo "short=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
id: git
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1.7.0
with:
role-duration-seconds: 900
role-to-assume: ${{ env.AWS_ROLE }}
aws-region: ${{ env.AWS_REGION }}
- name: Login to AWS Container Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
registry: ${{ secrets.AWS_ACCOUNT }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com
- name: Build and Push Docker
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
with:
context: .
file: server.Dockerfile
push: true
build-args: |
GH_PACKAGES_TOKEN=${{ secrets.GH_PACKAGES_TOKEN }}
cache-from: type=gha,scope=${{ github.repository }}
cache-to: type=gha,scope=${{ github.repository }},mode=max
tags: |
${{ secrets.AWS_ACCOUNT }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com/${{ env.REPO }}:latest
${{ secrets.AWS_ACCOUNT }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com/${{ env.REPO }}:${{ env.VERSION }}
env:
VERSION: ${{ steps.git.outputs.short }}
REPO: ${{ env.INTEGRATION }}
deploy:
name: Deployment
runs-on: ubuntu-latest
needs: [build]
timeout-minutes: 10
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.4.0
- run: |
echo "short=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
id: git
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1.7.0
with:
role-duration-seconds: 900
role-to-assume: ${{ env.AWS_ROLE }}
aws-region: ${{ env.AWS_REGION }}
- name: Deploy CloudFormation Stack
uses: aws-actions/aws-cloudformation-github-deploy@6901756eb70595fa9c1169141934562aa4e86f2a # v1.1.0
with:
name: ${{ env.INTEGRATION }}-${{ env.ENV }}
template: aws/cloudformation.yml
capabilities: CAPABILITY_NAMED_IAM
no-fail-on-empty-changeset: 1
timeout-in-minutes: 10
parameter-overrides: >-
Environment=${{ env.ENV }},
ContainerTag=${{ env.IMAGE_TAG_GIT }}
tags: |
[
{ "Key": "Project", "Value": "integrations" },
{ "Key": "Environment", "Value": "${{ env.ENV }}" }
]
env:
IMAGE_TAG_GIT: ${{ steps.git.outputs.short }}