Skip to content

Enhancement: Prepare release for 2.7.1 #32

Enhancement: Prepare release for 2.7.1

Enhancement: Prepare release for 2.7.1 #32

Workflow file for this run

name: Docker - v1
on:
pull_request: null
push:
paths:
- .github/workflows/v1.yaml
- '1.10/**'
env:
AWS_REGION: us-east-1
ECR_REPO: public.ecr.aws/u0u1j5s3/composer
jobs:
build:
name: Build v1.10
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: '1.10'
steps:
- uses: actions/checkout@v3
# Build full image: binary with runtime
- name: Build full image
run: |
docker build \
--pull \
--no-cache \
--target binary-with-runtime \
--tag composer/composer:1 \
--tag composer/composer:1.10 \
--tag composer/composer:$(grep -oP 'COMPOSER_VERSION 1.10.\d+' Dockerfile | grep -oP '1.10.\d+') \
.
# Build low-size image with binary only
- name: Build binary-only image
run: |
docker build \
--pull \
--no-cache \
--target standalone-binary \
--tag composer/composer:1-bin \
--tag composer/composer:1.10-bin \
--tag composer/composer:$(grep -oP 'COMPOSER_VERSION 1.10.\d+' Dockerfile | grep -oP '1.10.\d+')-bin \
.
- name: Login to Docker Hub
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Push tag(s) to Docker Hub
if: github.ref == 'refs/heads/main'
run: |
docker push composer/composer:1
docker push composer/composer:1-bin
docker push composer/composer:1.10
docker push composer/composer:1.10-bin
docker push composer/composer:$(grep -oP 'COMPOSER_VERSION 1.10.\d+' Dockerfile | grep -oP '1.10.\d+')
docker push composer/composer:$(grep -oP 'COMPOSER_VERSION 1.10.\d+' Dockerfile | grep -oP '1.10.\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'
run: |
docker tag composer/composer:1 $ECR_REPO:1
docker tag composer/composer:1-bin $ECR_REPO:1-bin
docker tag composer/composer:1.10 $ECR_REPO:1.10
docker tag composer/composer:1.10-bin $ECR_REPO:1.10-bin
docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION 1.10.\d+' Dockerfile | grep -oP '1.10.\d+') $ECR_REPO:$(grep -oP 'COMPOSER_VERSION 1.10.\d+' Dockerfile | grep -oP '1.10.\d+')
docker tag composer/composer:$(grep -oP 'COMPOSER_VERSION 1.10.\d+' Dockerfile | grep -oP '1.10.\d+')-bin $ECR_REPO:$(grep -oP 'COMPOSER_VERSION 1.10.\d+' Dockerfile | grep -oP '1.10.\d+')-bin
docker push $ECR_REPO:1
docker push $ECR_REPO:1-bin
docker push $ECR_REPO:1.10
docker push $ECR_REPO:1.10-bin
docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION 1.10.\d+' Dockerfile | grep -oP '1.10.\d+')
docker push $ECR_REPO:$(grep -oP 'COMPOSER_VERSION 1.10.\d+' Dockerfile | grep -oP '1.10.\d+')-bin