diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a1200280c..eb47581226 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,14 +2,14 @@ name: CI on: push: - # branches: - # - main - # paths: - # - ".github/workflows/ci.yml" - # - "containers/**" - # - "services/**" - # - "src/**" - # - "utilities/**" + branches: + - main + paths: + - ".github/workflows/ci.yml" + - "containers/**" + - "services/**" + - "src/**" + - "utilities/**" permissions: id-token: write @@ -20,6 +20,7 @@ env: AWS_REGION: eu-central-1 AWS_ROLE_ARN: arn:aws:iam::332405224602:role/ci EARTHLY_TARGET: docker + EARTHLY_VERSION: 0.7.6 ECR_REGISTRY: 332405224602.dkr.ecr.eu-central-1.amazonaws.com TAG: ${{ github.sha }} @@ -34,7 +35,9 @@ jobs: - name: Setup CI uses: input-output-hk/catalyst-ci/actions/setup@master with: - earthly_skip_install: "true" + aws_role_arn: ${{ env.AWS_ROLE_ARN }} + aws_region: ${{ env.AWS_REGION }} + earthly_version: ${{ env.EARTHLY_VERSION }} - name: Discover Earthfiles uses: input-output-hk/catalyst-ci/actions/discover@master id: discover @@ -50,6 +53,7 @@ jobs: with: aws_role_arn: ${{ env.AWS_ROLE_ARN }} aws_region: ${{ env.AWS_REGION }} + earthly_version: ${{ env.EARTHLY_VERSION }} - name: Build cache uses: input-output-hk/catalyst-ci/actions/build@master with: @@ -70,7 +74,7 @@ jobs: with: aws_role_arn: ${{ env.AWS_ROLE_ARN }} aws_region: ${{ env.AWS_REGION }} - earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }} + earthly_version: ${{ env.EARTHLY_VERSION }} - name: Login to ECR uses: docker/login-action@v2 with: @@ -81,20 +85,27 @@ jobs: earthfile: ${{ matrix.earthfile.path }} earthly_satellite: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} images: ${{ matrix.earthfile.images }} - publish: "false" + publish: "true" registry: ${{ env.ECR_REGISTRY }} tags: "${{ env.TAG }}" target: ${{ env.EARTHLY_TARGET }} - # deploy: - # runs-on: ubuntu-latest - # needs: [discover, build] - # steps: - # - name: Deploy - # uses: input-output-hk/catalyst-ci/actions/deploy@master - # with: - # deployment_repo: input-output-hk/catalyst-world - # # NOTE: For new services being deployed, this list must be updated - # images: cat-data-service fragment-exporter migrations voting-node - # environment: dev - # tag: ${{ env.TAG }} - # token: ${{ secrets.CI_BOT_TOKEN }} + deploy: + runs-on: ubuntu-latest + needs: [discover, build] + steps: + - name: Setup CI + uses: input-output-hk/catalyst-ci/actions/setup@master + id: setup + with: + aws_role_arn: ${{ env.AWS_ROLE_ARN }} + aws_region: ${{ env.AWS_REGION }} + earthly_version: ${{ env.EARTHLY_VERSION }} + - name: Deploy + uses: input-output-hk/catalyst-ci/actions/deploy@master + with: + deployment_repo: input-output-hk/catalyst-world + # NOTE: For new services being deployed, this list must be updated + images: cat-data-service fragment-exporter migrations voting-node + environment: dev + tag: ${{ env.TAG }} + token: ${{ steps.setup.outputs.token }}