mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
33
.github/workflows/update_docker_ci.yml
vendored
33
.github/workflows/update_docker_ci.yml
vendored
@@ -4,17 +4,13 @@ on:
|
||||
branches: [develop]
|
||||
paths:
|
||||
- 'docker/ci/**'
|
||||
- .github/workflows/update_docker_ci.yml
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
target_platform: [linux/amd64, linux/arm64]
|
||||
build_and_push:
|
||||
name: Build and push docker image
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
DOCKERHUB_REPO: rippleci
|
||||
steps:
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
@@ -23,14 +19,21 @@ jobs:
|
||||
password: ${{ secrets.DOCKERHUB_PW }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/metadata-action@v5
|
||||
id: meta
|
||||
with:
|
||||
images: rippleci/clio_ci
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=raw,value=${{ env.GITHUB_SHA }}
|
||||
|
||||
- name: Build image
|
||||
shell: bash
|
||||
run: |
|
||||
cd docker/ci
|
||||
docker build . -t clio_ci --progress=plain --platform=${{ matrix.target_platform }}
|
||||
for tag in "$GITHUB_SHA" "latest" ; do
|
||||
docker tag clio_ci ${DOCKERHUB_REPO}/clio_ci:${tag}
|
||||
docker push ${DOCKERHUB_REPO}/clio_ci:${tag}
|
||||
done
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ${{ github.workspace }}/docker/ci
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user