diff --git a/.github/workflows/v2-current.yaml b/.github/workflows/v2-current.yaml new file mode 100644 index 0000000..eb0115e --- /dev/null +++ b/.github/workflows/v2-current.yaml @@ -0,0 +1,94 @@ +name: Docker - v2 current + +on: + pull_request: null + push: + paths: + - .github/workflows/v2-current.yaml + - '2.6/**' + +env: + AWS_REGION: us-east-1 + ECR_REPO: public.ecr.aws/u0u1j5s3/composer + + build-latest: + name: Build latest version + runs-on: ubuntu-latest + timeout-minutes: 20 + strategy: + matrix: + version: + - "2.6" + steps: + - uses: actions/checkout@v3 + # Build full image: binary with runtime + - name: Build full image + working-directory: ${{ matrix.version }} + run: | + docker build \ + --pull \ + --no-cache \ + --target binary-with-runtime \ + --tag composer/composer:latest \ + --tag composer/composer:2 \ + --tag composer/composer:${{ matrix.version }} \ + --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') \ + . + # Build low-size image with binary only + - name: Build binary-only image + working-directory: ${{ matrix.version }} + run: | + docker build \ + --pull \ + --no-cache \ + --target standalone-binary \ + --tag composer/composer:latest-bin \ + --tag composer/composer:2-bin \ + --tag composer/composer:${{ matrix.version }}-bin \ + --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin \ + . + - name: Login to Docker Hub + if: github.ref == 'refs/heads/main' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Push tag(s) to Docker Hub + if: github.ref == 'refs/heads/main' + working-directory: ${{ matrix.version }} + run: | + docker push composer/composer:latest + docker push composer/composer:latest-bin + docker push composer/composer:2 + docker push composer/composer:2-bin + docker push composer/composer:${{ matrix.version }} + docker push composer/composer:${{ matrix.version }}-bin + docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') + docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin + - name: Login to Amazon Public ECR + if: github.ref == 'refs/heads/main' + uses: docker/login-action@v2 + with: + registry: public.ecr.aws + username: ${{ secrets.AWS_ECR_ACCESS_KEY }} + password: ${{ secrets.AWS_ECR_SECRET_KEY }} + - name: Push tag(s) to Amazon Public ECR + if: github.ref == 'refs/heads/main' + working-directory: ${{ matrix.version }} + run: | + docker tag composer/composer:latest $ECR_REPO:latest + docker tag composer/composer:latest-bin $ECR_REPO:latest-bin + docker tag composer/composer:2 $ECR_REPO:2 + docker tag composer/composer:2-bin $ECR_REPO:2-bin + docker tag composer/composer:${{ matrix.version }} $ECR_REPO:${{ matrix.version }} + docker tag composer/composer:${{ matrix.version }}-bin $ECR_REPO:${{ matrix.version }}-bin + docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') + docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin + docker push $ECR_REPO:latest + docker push $ECR_REPO:latest-bin + docker push $ECR_REPO:2 + docker push $ECR_REPO:2-bin + docker push $ECR_REPO:${{ matrix.version }} + docker push $ECR_REPO:${{ matrix.version }}-bin + docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') + docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin diff --git a/.github/workflows/v2-lts.yaml b/.github/workflows/v2-lts.yaml new file mode 100644 index 0000000..e760a4b --- /dev/null +++ b/.github/workflows/v2-lts.yaml @@ -0,0 +1,87 @@ +name: Docker - v2 LTS + +on: + pull_request: null + push: + paths: + - .github/workflows/v2-lts.yaml + - '2.2/**' + +env: + AWS_REGION: us-east-1 + ECR_REPO: public.ecr.aws/u0u1j5s3/composer + +jobs: + build-lts: + name: Build LTS version + runs-on: ubuntu-latest + timeout-minutes: 20 + strategy: + matrix: + version: + - "2.2" + steps: + - uses: actions/checkout@v3 + # Build full image: binary with runtime + - name: Build full image + working-directory: ${{ matrix.version }} + run: | + docker build \ + --pull \ + --no-cache \ + --target binary-with-runtime \ + --tag composer/composer:lts \ + --tag composer/composer:${{ matrix.version }} \ + --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') \ + . + # Build low-size image with binary only + - name: Build binary-only image + working-directory: ${{ matrix.version }} + run: | + docker build \ + --pull \ + --no-cache \ + --target standalone-binary \ + --tag composer/composer:lts-bin \ + --tag composer/composer:${{ matrix.version }}-bin \ + --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin \ + . + - name: Login to Docker Hub + if: github.ref == 'refs/heads/main' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Push tag(s) to Docker Hub + if: github.ref == 'refs/heads/main' + working-directory: ${{ matrix.version }} + run: | + docker push composer/composer:lts + docker push composer/composer:lts-bin + docker push composer/composer:${{ matrix.version }} + docker push composer/composer:${{ matrix.version }}-bin + docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') + docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin + - name: Login to Amazon Public ECR + if: github.ref == 'refs/heads/main' + uses: docker/login-action@v2 + with: + registry: public.ecr.aws + username: ${{ secrets.AWS_ECR_ACCESS_KEY }} + password: ${{ secrets.AWS_ECR_SECRET_KEY }} + - name: Push tag(s) to Amazon Public ECR + if: github.ref == 'refs/heads/main' + working-directory: ${{ matrix.version }} + run: | + docker tag composer/composer:lts $ECR_REPO:lts + docker tag composer/composer:lts-bin $ECR_REPO:lts-bin + docker tag composer/composer:${{ matrix.version }} $ECR_REPO:${{ matrix.version }} + docker tag composer/composer:${{ matrix.version }}-bin $ECR_REPO:${{ matrix.version }}-bin + docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') + docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin + docker push $ECR_REPO:lts + docker push $ECR_REPO:lts-bin + docker push $ECR_REPO:${{ matrix.version }} + docker push $ECR_REPO:${{ matrix.version }}-bin + docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') + docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin diff --git a/.github/workflows/v2-previous.yaml b/.github/workflows/v2-previous.yaml new file mode 100644 index 0000000..b756da3 --- /dev/null +++ b/.github/workflows/v2-previous.yaml @@ -0,0 +1,83 @@ +name: Docker - v2 previous + +on: + pull_request: null + push: + paths: + - .github/workflows/v2-previous.yaml + - '2.3/**' + - '2.4/**' + - '2.5/**' + +env: + AWS_REGION: us-east-1 + ECR_REPO: public.ecr.aws/u0u1j5s3/composer + + build-previous: + name: Build previous versions + runs-on: ubuntu-latest + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + version: + - "2.3" + - "2.4" + - "2.5" + steps: + - uses: actions/checkout@v3 + # Build full image: binary with runtime + - name: Build full image + working-directory: ${{ matrix.version }} + run: | + docker build \ + --pull \ + --no-cache \ + --target binary-with-runtime \ + --tag composer/composer:${{ matrix.version }} \ + --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') \ + . + # Build low-size image with binary only + - name: Build binary-only image + working-directory: ${{ matrix.version }} + run: | + docker build \ + --pull \ + --no-cache \ + --target standalone-binary \ + --tag composer/composer:${{ matrix.version }}-bin \ + --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin \ + . + - name: Login to Docker Hub + if: github.ref == 'refs/heads/main' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Push tag(s) to Docker Hub + if: github.ref == 'refs/heads/main' + working-directory: ${{ matrix.version }} + run: | + docker push composer/composer:${{ matrix.version }} + docker push composer/composer:${{ matrix.version }}-bin + docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') + docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin + - name: Login to Amazon Public ECR + if: github.ref == 'refs/heads/main' + uses: docker/login-action@v2 + with: + registry: public.ecr.aws + username: ${{ secrets.AWS_ECR_ACCESS_KEY }} + password: ${{ secrets.AWS_ECR_SECRET_KEY }} + - name: Push tag(s) to Amazon Public ECR + if: github.ref == 'refs/heads/main' + working-directory: ${{ matrix.version }} + run: | + docker tag composer/composer:${{ matrix.version }} $ECR_REPO:${{ matrix.version }} + docker tag composer/composer:${{ matrix.version }}-bin $ECR_REPO:${{ matrix.version }}-bin + docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') + docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin + docker push $ECR_REPO:${{ matrix.version }} + docker push $ECR_REPO:${{ matrix.version }}-bin + docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') + docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin diff --git a/.github/workflows/v2.yaml b/.github/workflows/v2.yaml deleted file mode 100644 index adb2193..0000000 --- a/.github/workflows/v2.yaml +++ /dev/null @@ -1,238 +0,0 @@ -name: Docker - v2 - -on: - pull_request: null - push: - paths: - - .github/workflows/v2.yaml - - '2.*/**' - -env: - AWS_REGION: us-east-1 - ECR_REPO: public.ecr.aws/u0u1j5s3/composer - -jobs: - build-lts: - name: Build LTS version - runs-on: ubuntu-latest - timeout-minutes: 20 - strategy: - matrix: - version: - - "2.2" - steps: - - uses: actions/checkout@v3 - # Build full image: binary with runtime - - name: Build full image - working-directory: ${{ matrix.version }} - run: | - docker build \ - --pull \ - --no-cache \ - --target binary-with-runtime \ - --tag composer/composer:lts \ - --tag composer/composer:${{ matrix.version }} \ - --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') \ - . - # Build low-size image with binary only - - name: Build binary-only image - working-directory: ${{ matrix.version }} - run: | - docker build \ - --pull \ - --no-cache \ - --target standalone-binary \ - --tag composer/composer:lts-bin \ - --tag composer/composer:${{ matrix.version }}-bin \ - --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin \ - . - - name: Login to Docker Hub - if: github.ref == 'refs/heads/main' - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Push tag(s) to Docker Hub - if: github.ref == 'refs/heads/main' - working-directory: ${{ matrix.version }} - run: | - docker push composer/composer:lts - docker push composer/composer:lts-bin - docker push composer/composer:${{ matrix.version }} - docker push composer/composer:${{ matrix.version }}-bin - docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') - docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin - - name: Login to Amazon Public ECR - if: github.ref == 'refs/heads/main' - uses: docker/login-action@v2 - with: - registry: public.ecr.aws - username: ${{ secrets.AWS_ECR_ACCESS_KEY }} - password: ${{ secrets.AWS_ECR_SECRET_KEY }} - - name: Push tag(s) to Amazon Public ECR - if: github.ref == 'refs/heads/main' - working-directory: ${{ matrix.version }} - run: | - docker tag composer/composer:lts $ECR_REPO:lts - docker tag composer/composer:lts-bin $ECR_REPO:lts-bin - docker tag composer/composer:${{ matrix.version }} $ECR_REPO:${{ matrix.version }} - docker tag composer/composer:${{ matrix.version }}-bin $ECR_REPO:${{ matrix.version }}-bin - docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') - docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin - docker push $ECR_REPO:lts - docker push $ECR_REPO:lts-bin - docker push $ECR_REPO:${{ matrix.version }} - docker push $ECR_REPO:${{ matrix.version }}-bin - docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') - docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin - - build-previous: - name: Build previous versions - runs-on: ubuntu-latest - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - version: - - "2.3" - - "2.4" - - "2.5" - steps: - - uses: actions/checkout@v3 - # Build full image: binary with runtime - - name: Build full image - working-directory: ${{ matrix.version }} - run: | - docker build \ - --pull \ - --no-cache \ - --target binary-with-runtime \ - --tag composer/composer:${{ matrix.version }} \ - --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') \ - . - # Build low-size image with binary only - - name: Build binary-only image - working-directory: ${{ matrix.version }} - run: | - docker build \ - --pull \ - --no-cache \ - --target standalone-binary \ - --tag composer/composer:${{ matrix.version }}-bin \ - --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin \ - . - - name: Login to Docker Hub - if: github.ref == 'refs/heads/main' - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Push tag(s) to Docker Hub - if: github.ref == 'refs/heads/main' - working-directory: ${{ matrix.version }} - run: | - docker push composer/composer:${{ matrix.version }} - docker push composer/composer:${{ matrix.version }}-bin - docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') - docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin - - name: Login to Amazon Public ECR - if: github.ref == 'refs/heads/main' - uses: docker/login-action@v2 - with: - registry: public.ecr.aws - username: ${{ secrets.AWS_ECR_ACCESS_KEY }} - password: ${{ secrets.AWS_ECR_SECRET_KEY }} - - name: Push tag(s) to Amazon Public ECR - if: github.ref == 'refs/heads/main' - working-directory: ${{ matrix.version }} - run: | - docker tag composer/composer:${{ matrix.version }} $ECR_REPO:${{ matrix.version }} - docker tag composer/composer:${{ matrix.version }}-bin $ECR_REPO:${{ matrix.version }}-bin - docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') - docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin - docker push $ECR_REPO:${{ matrix.version }} - docker push $ECR_REPO:${{ matrix.version }}-bin - docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') - docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin - - build-latest: - name: Build latest version - runs-on: ubuntu-latest - timeout-minutes: 20 - strategy: - matrix: - version: - - "2.6" - steps: - - uses: actions/checkout@v3 - # Build full image: binary with runtime - - name: Build full image - working-directory: ${{ matrix.version }} - run: | - docker build \ - --pull \ - --no-cache \ - --target binary-with-runtime \ - --tag composer/composer:latest \ - --tag composer/composer:2 \ - --tag composer/composer:${{ matrix.version }} \ - --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') \ - . - # Build low-size image with binary only - - name: Build binary-only image - working-directory: ${{ matrix.version }} - run: | - docker build \ - --pull \ - --no-cache \ - --target standalone-binary \ - --tag composer/composer:latest-bin \ - --tag composer/composer:2-bin \ - --tag composer/composer:${{ matrix.version }}-bin \ - --tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin \ - . - - name: Login to Docker Hub - if: github.ref == 'refs/heads/main' - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Push tag(s) to Docker Hub - if: github.ref == 'refs/heads/main' - working-directory: ${{ matrix.version }} - run: | - docker push composer/composer:latest - docker push composer/composer:latest-bin - docker push composer/composer:2 - docker push composer/composer:2-bin - docker push composer/composer:${{ matrix.version }} - docker push composer/composer:${{ matrix.version }}-bin - docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') - docker push composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin - - name: Login to Amazon Public ECR - if: github.ref == 'refs/heads/main' - uses: docker/login-action@v2 - with: - registry: public.ecr.aws - username: ${{ secrets.AWS_ECR_ACCESS_KEY }} - password: ${{ secrets.AWS_ECR_SECRET_KEY }} - - name: Push tag(s) to Amazon Public ECR - if: github.ref == 'refs/heads/main' - working-directory: ${{ matrix.version }} - run: | - docker tag composer/composer:latest $ECR_REPO:latest - docker tag composer/composer:latest-bin $ECR_REPO:latest-bin - docker tag composer/composer:2 $ECR_REPO:2 - docker tag composer/composer:2-bin $ECR_REPO:2-bin - docker tag composer/composer:${{ matrix.version }} $ECR_REPO:${{ matrix.version }} - docker tag composer/composer:${{ matrix.version }}-bin $ECR_REPO:${{ matrix.version }}-bin - docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') - docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin - docker push $ECR_REPO:latest - docker push $ECR_REPO:latest-bin - docker push $ECR_REPO:2 - docker push $ECR_REPO:2-bin - docker push $ECR_REPO:${{ matrix.version }} - docker push $ECR_REPO:${{ matrix.version }}-bin - docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+') - docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION ${{ matrix.version }}.\d+' Dockerfile | grep -oP '${{ matrix.version }}.\d+')-bin