Skip to content

ci

ci #24

Workflow file for this run

name: ci
on:
#push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
vers:
- "5.0.0"
- "5.1.0"
- "5.1.1"
- "5.1.2"
- "5.1.3"
- "5.1.4"
- "5.2.0"
- "5.3.0"
- "5.3.1"
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
-
name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
# -
# name: Login to DockerHub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build dockerfile (with no push)
run: |
latest=$(cat latest);
echo $latest;
latest_tag="--tag dyrnq/rocketmq:${{ matrix.vers }}";
if [[ "${{ matrix.vers }}" = "5.3.0" ]]; then
latest_tag="${latest_tag} --tag dyrnq/rocketmq:latest"
fi
echo $latest_tag;
docker buildx build \
--platform linux/amd64,linux/arm64/v8 \
--output "type=image,push=false" \
--file ./Dockerfile . \
--build-arg version="${{ matrix.vers }}" \
$latest_tag
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build dockerfile (with push)
run: |
latest=$(cat latest);
echo $latest;
latest_tag="--tag dyrnq/rocketmq:${{ matrix.vers }}";
if [[ "${{ matrix.vers }}" = "5.3.0" ]]; then
latest_tag="${latest_tag} --tag dyrnq/rocketmq:latest"
fi
echo $latest_tag;
docker buildx build \
--platform linux/amd64,linux/arm64/v8 \
--output "type=image,push=true" \
--file ./Dockerfile . \
--build-arg version="${{ matrix.vers }}" \
$latest_tag
#docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --build-arg version=4.8.0 --tag dyrnq/rocketmq:4.8.0
#docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --build-arg version=4.9.0 --tag dyrnq/rocketmq:4.9.0
#docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --build-arg version=4.9.1 --tag dyrnq/rocketmq:4.9.1
#docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --build-arg version=4.9.2 --tag dyrnq/rocketmq:4.9.2
# docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --build-arg version=4.9.6 --tag dyrnq/rocketmq:4.9.6
# docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --build-arg version=4.9.7 --tag dyrnq/rocketmq:4.9.7
# docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --build-arg version=5.1.2 --tag dyrnq/rocketmq:5.1.2
# docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --build-arg version=5.1.3 --tag dyrnq/rocketmq:5.1.3 --tag dyrnq/rocketmq:latest
# docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --build-arg version=5.1.4 --tag dyrnq/rocketmq:5.1.4 --tag dyrnq/rocketmq:latest