Test commit 2096e5c7e22ab228351567cc3428dd3382ea7ead #196
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - integ-tests | |
| name: Integration Test | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Print current build ID | |
| run: | | |
| echo Integration test run: githubactionsamazonecrlogin-VM0j5Qh3DBOo:60eb4ea6-2e21-401a-9282-d883a5796e5d | |
| - name: Configure AWS credentials | |
| id: configure-aws-credentials-pdx | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-west-2 | |
| - name: Login to Amazon ECR | |
| id: login-ecr | |
| uses: aws-actions/amazon-ecr-login@2096e5c7e22ab228351567cc3428dd3382ea7ead | |
| - name: Tag and push a docker image to Amazon ECR | |
| env: | |
| ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
| ECR_REPOSITORY: github-actions-amazon-ecr-login-integ-tests | |
| IMAGE_TAG: latest | |
| run: | | |
| docker pull amazonlinux | |
| docker tag amazonlinux $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | |
| docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | |
| - name: Login to Amazon ECR using explicit registry ID | |
| uses: aws-actions/amazon-ecr-login@2096e5c7e22ab228351567cc3428dd3382ea7ead | |
| with: | |
| registries: ${{ steps.configure-aws-credentials.outputs.aws-account-id }} | |
| - name: Configure AWS credentials | |
| id: configure-aws-credentials-iad | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Login to Amazon ECR Public | |
| id: login-ecr-public | |
| uses: aws-actions/amazon-ecr-login@2096e5c7e22ab228351567cc3428dd3382ea7ead | |
| with: | |
| registry-type: public | |
| - name: Tag and push a docker image to Amazon ECR Public | |
| env: | |
| ECR_PUBLIC_REGISTRY_ALIAS: github-actions-amazon-ecr-login-integ-tests | |
| ECR_PUBLIC_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | |
| ECR_PUBLIC_REPOSITORY: github-actions-amazon-ecr-login-integ-tests | |
| IMAGE_TAG: latest | |
| run: | | |
| docker pull amazonlinux | |
| docker tag amazonlinux $ECR_PUBLIC_REGISTRY/$ECR_PUBLIC_REGISTRY_ALIAS/$ECR_PUBLIC_REPOSITORY:$IMAGE_TAG | |
| docker push $ECR_PUBLIC_REGISTRY/$ECR_PUBLIC_REGISTRY_ALIAS/$ECR_PUBLIC_REPOSITORY:$IMAGE_TAG | |