diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86e21251e..4696cc25c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,13 @@ jobs: uses: actions/checkout@v4 with: repository: "researchhub/researchhub-internal-utils" - ref: main + ref: feature/beanstalk-cicd path: researchhub-internal-utils token: ${{ secrets.PAT }} + - name: Set package name + run: echo "PACKAGE_NAME=backend-$(echo $GITHUB_SHA | cut -c1-8)" >> "$GITHUB_ENV" + - name: Copy Beanstalk configuration files run: | cp -r researchhub-internal-utils/deploy/backend/config/.ebextensions \ @@ -33,13 +36,13 @@ jobs: run: | mkdir -p target cd src - zip -r ../target/deploy.zip . + zip -r ../target/${PACKAGE_NAME}.zip . - name: Upload artifact uses: actions/upload-artifact@v4 with: name: deploy - path: target/deploy.zip + path: target/${PACKAGE_NAME}.zip - name: Configure AWS credentials with assume role id: aws_credentials @@ -64,5 +67,5 @@ jobs: version_label: ${{ github.sha }} use_existing_version_if_available: true region: us-east-1 - deployment_package: target/deploy.zip + deployment_package: target/${PACKAGE_NAME}.zip wait_for_environment_recovery: 120