Skip to content

Commit

Permalink
Fix for code download url
Browse files Browse the repository at this point in the history
  • Loading branch information
sshrihar committed Apr 14, 2024
1 parent 88348c1 commit 86e11ee
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions .github/workflows/ecs_deploy_docker_taskdef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ on:
type: string
taskdef_file_script:
required: false
default: "pipelines/Support/taskdef_template/taskdef_creator.py"
default: "Support/taskdef_template/taskdef_creator.py"
type: string
taskdef_file_template:
required: false
default: "pipelines/Support/taskdef_template/taskdef_template.json"
default: "Support/taskdef_template/taskdef_template.json"
type: string
aws_region:
required: false
Expand All @@ -35,25 +35,18 @@ on:

jobs:
download_support_scripts:
if: ${{ inputs.taskdef_file_script == 'pipelines/Support/taskdef_template/taskdef_creator.py' }}
if: ${{ inputs.taskdef_file_script == 'Support/taskdef_template/taskdef_creator.py' }}
runs-on: ubuntu-latest
steps:
- name: Sparse Checkout with Script
run: |
git clone --depth=1 --single-branch --branch=DEVOPS-2732-common-python-module-added https://github.com/0xPolygon/pipelines.git pipelines
git sparse-checkout init --cone Support/taskdef_template # Initialize sparse checkout for Support/taskdef_template folder
cd pipelines
git checkout
# - name: Download Repository Code
# uses: actions/download-artifact@v2
# with:
# name: bridge-api-services
# path: https://github.com/0xPolygon/bridge-api-services/archive/refs/heads/DEVOPS-2732-common-python-module-added.zip
- name: Download Repository Code
uses: actions/download-artifact@v2
with:
name: bridge-api-services
path: https://github.com/0xPolygon/pipelines/archive/refs/heads/DEVOPS-2732-common-python-module-added.zip

- name: Extract parent repo code
run: |
ls -lrt
tar -xzf bridge-api-services.tar.gz 'Support/taskdef_template/'
deploy_workflow:
name: Deploy ${{ inputs.app_name }}
Expand All @@ -64,6 +57,9 @@ jobs:
environment: ${{ inputs.environment }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create taskdef file dynamically using parameters passed
run: |
script_dir=$(dirname ${{ inputs.taskdef_file_script }})
Expand All @@ -77,10 +73,6 @@ jobs:
pipenv install && \
pipenv run python ${{ inputs.taskdef_file_script }} \
${{ inputs.taskdef_file_vars }} ${{ inputs.taskdef_file_template }}
rm -rf pipelines
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down

0 comments on commit 86e11ee

Please sign in to comment.