fix outdated docker build
This commit is contained in:
parent
4eb1a82ab7
commit
73c5b1573a
53
.github/workflows/docker-image.yml
vendored
53
.github/workflows/docker-image.yml
vendored
@ -9,58 +9,37 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: crazy-max/ghaction-docker-buildx@v3
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
id: cache
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
-
|
||||
name: Docker Buildx (build amd64 arm64)
|
||||
run: |
|
||||
docker buildx build \
|
||||
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
||||
--cache-to "type=local,dest=/tmp/.buildx-cache" \
|
||||
--platform linux/amd64 \
|
||||
--output "type=image,push=false" \
|
||||
--tag albertoxamin/bang:latest \
|
||||
--file ./Dockerfile ./
|
||||
-
|
||||
name: Docker Buildx (build armv-7)
|
||||
run: |
|
||||
docker buildx build \
|
||||
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
||||
--cache-to "type=local,dest=/tmp/.buildx-cache" \
|
||||
--platform linux/arm/v7 \
|
||||
--output "type=image,push=false" \
|
||||
--tag albertoxamin/bang:latest \
|
||||
--file ./Dockerfile ./
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
-
|
||||
name: Docker Buildx (push all)
|
||||
run: |
|
||||
docker buildx build \
|
||||
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
||||
--platform linux/amd64,linux/arm/v7 \
|
||||
--output "type=image,push=true" \
|
||||
--tag albertoxamin/bang:latest \
|
||||
--file ./Dockerfile ./
|
||||
-
|
||||
name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect albertoxamin/bang:latest
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/arm/v7,linux/amd64
|
||||
push: true
|
||||
tags: albertoxamin/bang:latest
|
||||
cache-from: type=registry,ref=user/app:latest
|
||||
cache-to: type=inline
|
||||
|
||||
- name: Notify discord
|
||||
uses: th0th/notify-discord@v0.4.1
|
||||
|
Loading…
Reference in New Issue
Block a user