54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
name: Docker Images CI
|
|
on:
|
|
push:
|
|
branches: dev
|
|
|
|
jobs:
|
|
buildx:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: crazy-max/ghaction-docker-buildx@v3
|
|
-
|
|
name: Cache Docker layers
|
|
uses: actions/cache@v2
|
|
id: cache
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-buildx-
|
|
-
|
|
name: Docker Buildx (build)
|
|
run: |
|
|
docker buildx build \
|
|
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
|
--cache-to "type=local,dest=/tmp/.buildx-cache" \
|
|
--platform linux/386,linux/amd64,linux/arm/v7,linux/arm64 \
|
|
--output "type=image,push=false" \
|
|
--tag albertoxamin/bang:dev \
|
|
--file ./Dockerfile-diun ./
|
|
-
|
|
name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
-
|
|
name: Docker Buildx (push)
|
|
run: |
|
|
docker buildx build \
|
|
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
|
--platform linux/386,linux/amd64,linux/arm/v7,linux/arm64 \
|
|
--output "type=image,push=true" \
|
|
--tag albertoxamin/bang:dev \
|
|
--file ./Dockerfile-diun ./
|
|
-
|
|
name: Inspect image
|
|
run: |
|
|
docker buildx imagetools inspect albertoxamin/bang:dev
|