Skip to content

Commit

Permalink
ci: ensure code is checked out in deploy job PE-5601
Browse files Browse the repository at this point in the history
  • Loading branch information
djwhitt committed Feb 7, 2024
1 parent 7112ed5 commit c6c48f5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest

needs: test
if: github.ref == 'refs/heads/develop'
if: github.ref == 'refs/heads/develop' && github.event_name != 'pull_request'

permissions:
actions: write
Expand All @@ -76,9 +76,10 @@ jobs:
ECR_REGISTRY: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com

steps:
- uses: actions/checkout@v4

# Build and push container image to ECR
- name: Configure AWS credentials
if: github.event_name != 'pull_request'
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_BUILD_INVOCATION_ROLE }}
Expand All @@ -98,20 +99,18 @@ jobs:
${{ env.ECR_REGISTRY }}/ar-io-core:${{ github.sha }}
- name: Build and push envoy container image to ECR
if: ${{ github.ref == 'refs/heads/develop' }}
uses: docker/build-push-action@v5
with:
context: envoy/
labels: |
org.opencontainers.image.revision=${{ github.sha }}
context: envoy/
push: true
tags: |
${{ env.ECR_REGISTRY }}/ar-io-envoy:develop
${{ env.ECR_REGISTRY }}/ar-io-envoy:${{ github.sha }}
# Start CodePipeline to test and deploy images
- name: Start CodePipeline
if: github.ref == 'refs/heads/develop'
run: |
aws codepipeline start-pipeline-execution \
--name ${{ secrets.AWS_CODEPIPELINE_NAME }}
Expand Down

0 comments on commit c6c48f5

Please sign in to comment.