mirror of
https://github.com/fergalmoran/bitchmin.git
synced 2025-12-22 09:27:53 +00:00
CI fix
This commit is contained in:
39
.github/workflows/build-server.yml
vendored
39
.github/workflows/build-server.yml
vendored
@@ -5,44 +5,35 @@ on:
|
||||
branches: trunk
|
||||
|
||||
jobs:
|
||||
buildx:
|
||||
buildx:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
DOCKER_IMAGE=fergalmoran/bitchmin-api
|
||||
DOCKER_PLATFORMS=linux/amd64,linux/arm/v7
|
||||
VERSION=latest
|
||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
|
||||
--file ./server/Dockerfile ./server
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: crazy-max/ghaction-docker-buildx@v3
|
||||
with:
|
||||
buildx-version: latest
|
||||
qemu-version: latest
|
||||
-
|
||||
name: Docker Buildx (build)
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }}
|
||||
name: Available platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
-
|
||||
name: Login to DockerHub
|
||||
if: success() && github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
-
|
||||
name: Docker Buildx (push)
|
||||
if: success() && github.event_name != 'pull_request'
|
||||
name: Run Buildx
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }}
|
||||
-
|
||||
name: Inspect image
|
||||
if: always() && github.event_name != 'pull_request'
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}
|
||||
|
||||
docker buildx build \
|
||||
--platform linux/arm/v7 \
|
||||
--output "type=image,push=true" \
|
||||
--output "type=image,push=true" \
|
||||
-t fergalmoran/bitchmin-api \
|
||||
--file ./server/Dockerfile ./server
|
||||
Reference in New Issue
Block a user