diff --git a/.github/workflows/packages.yaml b/.github/workflows/packages.yaml index ee6c255..976639b 100644 --- a/.github/workflows/packages.yaml +++ b/.github/workflows/packages.yaml @@ -22,6 +22,14 @@ jobs: steps: - name: checkout repository to runner uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 + - name: Login to GitHub Container Registry + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GH_SECRET_PACKAGE }} # write packages and repo - name: Build and push uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0 @@ -29,5 +37,5 @@ jobs: context: . push: true tags: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:latest" - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=inline + cache-to: type=inline,mode=max diff --git a/compose.yaml b/compose.yaml index dcccbc4..ace93cc 100644 --- a/compose.yaml +++ b/compose.yaml @@ -3,6 +3,12 @@ services: build: context: ./ dockerfile: Dockerfile + # cache_from: + # - ghcr.io/ryosukedtomita/devsecops-demo-aws-ecs + # - type=inline + # cache_to: + # - ghcr.io/ryosukedtomita/devsecops-demo-aws-ecs + # - type=inline image: react-app:latest container_name: react-app-container ports: