Skip to content

Commit

Permalink
Activate Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhammerl committed Oct 16, 2023
1 parent 26a7c22 commit 17a403d
Showing 1 changed file with 36 additions and 37 deletions.
73 changes: 36 additions & 37 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on: push

env:
AWS_REGION: us-east-1
# CICD_ROLE: ${{ secrets.CICD_ROLE }}
PIPENV_VENV_IN_PROJECT: true

jobs:
Expand Down Expand Up @@ -37,39 +36,39 @@ jobs:
- name: Unit test
run: make test-unit

# deploy:
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
# needs: test-unit
# timeout-minutes: 15
# permissions:
# id-token: write
# contents: read

# steps:
# - name: Check out repository code
# uses: actions/checkout@v2

# - name: Setup Python
# uses: actions/setup-python@v2
# with:
# python-version: "3.11"

# - name: Install pipenv
# run: python -m pip install --upgrade pipenv

# - name: Setup Terraform
# uses: hashicorp/setup-terraform@v2
# with:
# terraform_wrapper: false

# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-region: ${{env.AWS_REGION}}
# role-to-assume: ${{ env.CICD_ROLE }}
# role-duration-seconds: 900
# role-skip-session-tagging: true

# - name: Deploy to dev
# run: make
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: test-unit
timeout-minutes: 15
permissions:
id-token: write
contents: read

steps:
- name: Check out repository code
uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.11"

- name: Install pipenv
run: python -m pip install --upgrade pipenv

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ${{env.AWS_REGION}}
role-to-assume: ${{ secrets.CI }}
role-duration-seconds: 900
role-skip-session-tagging: true

- name: Deploy to dev
run: make

0 comments on commit 17a403d

Please sign in to comment.