|
1 | | -name: Core CI/CD workflow |
| 1 | +name: Core Gitflow CI Action workflow |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
15 | 15 | - master |
16 | 16 |
|
17 | 17 | env: |
18 | | - # AWS region of the AWS account storing images in ECR. |
| 18 | + # AWS region of the AWS account storing images in AWS ECR. |
19 | 19 | CORE_AWS_REGION: eu-north-1 |
20 | | - # The latest action version. |
21 | | - ECR_BUILD_PUSH_ACTION_VERSION: v2 |
22 | 20 |
|
23 | 21 | jobs: |
24 | | - ecr-build-push: |
25 | | - name: Checkout main and ecr-build-push action repositories, run ecr-build-push action |
26 | | - if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }} |
27 | | - runs-on: ubuntu-20.04 |
| 22 | + gitflow-ci: |
| 23 | + name: Checkout main repository, run Gitflow CI action |
| 24 | + runs-on: ubuntu-22.04 |
28 | 25 | steps: |
29 | 26 | - name: Checkout main repository |
30 | | - uses: actions/checkout@v2 |
| 27 | + uses: actions/checkout@v4 |
31 | 28 | with: |
32 | 29 | ref: ${{ github.ref }} |
33 | 30 | fetch-depth: 0 |
34 | 31 |
|
35 | | - - name: Checkout ecr-build-push action repository |
36 | | - uses: actions/checkout@v2 |
| 32 | + - name: Checkout Gitflow CI action repository |
| 33 | + uses: actions/checkout@v4 |
37 | 34 | with: |
38 | | - repository: edenlabllc/fhir.ecr_build_push.action |
39 | | - ref: ${{ env.ECR_BUILD_PUSH_ACTION_VERSION }} |
| 35 | + repository: edenlabllc/gitflow.ci.action |
| 36 | + ref: v1 |
40 | 37 | token: ${{ secrets.GH_TOKEN_REPO_FULL_ACCESS }} |
41 | | - path: .github/actions/ecr-build-push |
| 38 | + path: .github/actions/gitflow.ci.action |
42 | 39 |
|
43 | | - - name: Configure AWS credentials |
44 | | - uses: aws-actions/configure-aws-credentials@v1 |
| 40 | + - name: Run Gitflow CI action |
| 41 | + uses: ./.github/actions/gitflow.ci.action |
45 | 42 | with: |
46 | | - aws-region: ${{ env.CORE_AWS_REGION }} |
47 | | - aws-access-key-id: ${{ secrets.CORE_AWS_ACCESS_KEY_ID }} |
48 | | - aws-secret-access-key: ${{ secrets.CORE_AWS_SECRET_ACCESS_KEY }} |
49 | | - |
50 | | - - name: Login to AWS ECR |
51 | | - uses: aws-actions/amazon-ecr-login@v1 |
52 | | - |
53 | | - - name: Pull ecr-build-push action image from AWS ECR |
54 | | - run: | |
55 | | - ECR_REGISTRY_URL="${{ secrets.CORE_AWS_ACCOUNT_ID }}.dkr.ecr.${{ env.CORE_AWS_REGION }}.amazonaws.com" |
56 | | - IMAGE_NAME="core.fhir.ecr_build_push.action" |
57 | | - IMAGE_FULL_NAME="${ECR_REGISTRY_URL}/${IMAGE_NAME}:${{ env.ECR_BUILD_PUSH_ACTION_VERSION }}" |
58 | | - docker pull "${IMAGE_FULL_NAME}" |
59 | | - docker tag "${IMAGE_FULL_NAME}" "${IMAGE_NAME}" |
60 | | -
|
61 | | - - name: Run ecr-build-push action |
62 | | - id: ecr-build-push |
63 | | - uses: ./.github/actions/ecr-build-push |
64 | | - |
65 | | - # To produce GitHub release artifacts only and skip image and deploy-related functionality |
66 | | - # a single input is required: |
67 | | - #with: |
68 | | - # build_push_image: false |
69 | | - |
70 | | - # Common action inputs |
71 | | - with: |
72 | | - core_aws_account_id: ${{ secrets.CORE_AWS_ACCOUNT_ID }} |
73 | 43 | core_aws_region: ${{ env.CORE_AWS_REGION }} |
74 | 44 | core_aws_access_key_id: ${{ secrets.CORE_AWS_ACCESS_KEY_ID }} |
75 | | - core_aws_secret_key: ${{ secrets.CORE_AWS_SECRET_ACCESS_KEY }} |
76 | | - repository_name_prefix: "core." |
77 | | - public_repository: true |
78 | | - delete_image: false |
79 | | - scan_image: false |
| 45 | + core_aws_secret_access_key: ${{ secrets.CORE_AWS_SECRET_ACCESS_KEY }} |
| 46 | + github_token_repo_full_access: ${{ secrets.GH_TOKEN_REPO_FULL_ACCESS }} |
| 47 | + ecr_public_repository: true |
| 48 | + ecr_repository_name_prefix: core. |
| 49 | + image_delete: false |
| 50 | + image_scan: false |
0 commit comments