From aad63c75a61f20245cd66c76207b9cc66222cee7 Mon Sep 17 00:00:00 2001 From: tadashi0713 Date: Mon, 18 Nov 2024 23:08:08 +0900 Subject: [PATCH] modify ci --- .github/workflows/ci.yml | 37 +++++-------------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff27825..92edfd1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,54 +4,27 @@ on: pull_request: env: - ECR_REPOSITORY: 'tadashi/docker-scout-demo' IMAGE_TAG: ${{ github.sha }} DOCKER_SCOUT_HUB_USER: ${{ secrets.DOCKER_USERNAME }} DOCKER_SCOUT_HUB_PASSWORD: ${{ secrets.DOCKER_TOKEN }} - AWS_REGION: 'ap-northeast-1' - AWS_ROLE_ARN: 'arn:aws:iam::175142243308:role/tadashi-docker-scout-demo-role' - ECR_REGISTRY: '175142243308.dkr.ecr.ap-northeast-1.amazonaws.com' + DOCKERHUB_REPOSITORY: 'tadashinemoto567/docker-scout-demo' jobs: scout: - # runs-on: ubuntu-latest - # permissions: - # pull-requests: write - # steps: - # - uses: docker/setup-buildx-action@v3 - # - uses: docker/build-push-action@v6 - # with: - # push: false - # load: true - # tags: ${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }} - # - id: docker-scout - # uses: docker/scout-action@v1 - # with: - # command: compare - # image: ${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }} - # to-env: production - # organization: tadashinemoto567 runs-on: ubuntu-latest permissions: pull-requests: write - id-token: write - contents: read steps: - uses: docker/setup-buildx-action@v3 - - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-region: ${{ env.AWS_REGION }} - role-to-assume: ${{ env.AWS_ROLE_ARN }} - - uses: docker/login-action@v3 - with: - registry: ${{ env.ECR_REGISTRY }} - uses: docker/build-push-action@v6 with: - tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} + push: false + load: true + tags: ${{ env.DOCKERHUB_REPOSITORY }}:${{ env.IMAGE_TAG }} - id: docker-scout uses: docker/scout-action@v1 with: command: compare - image: ${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} + image: ${{ env.DOCKERHUB_REPOSITORY }}:${{ env.IMAGE_TAG }} to-env: production organization: tadashinemoto567