44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
name: Test Pull requests
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
buildx:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: crazy-max/ghaction-docker-buildx@v3
|
|
-
|
|
name: Cache Docker layers
|
|
uses: actions/cache@v3
|
|
id: cache
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-buildx-
|
|
-
|
|
name: Docker Buildx (test build amd64)
|
|
run: |
|
|
docker buildx build \
|
|
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
|
--cache-to "type=local,dest=/tmp/.buildx-cache" \
|
|
--platform linux/arm64 \
|
|
--output "type=image,push=false" \
|
|
--tag albertoxamin/bang:test \
|
|
--file ./Dockerfile ./
|
|
-
|
|
name: Docker Buildx (test build arm64)
|
|
run: |
|
|
docker buildx build \
|
|
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
|
--cache-to "type=local,dest=/tmp/.buildx-cache" \
|
|
--platform linux/arm64 \
|
|
--output "type=image,push=false" \
|
|
--tag albertoxamin/bang:test \
|
|
--file ./Dockerfile ./
|