build: revert to old way of docker job (#508)

build: try old way for docker build
This commit is contained in:
ze0s 2022-10-19 22:17:45 +02:00 committed by GitHub
parent 2d8f7aeb4e
commit 2cc08bed71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 73 deletions

View file

@ -90,19 +90,6 @@ jobs:
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Download web production build
uses: actions/download-artifact@v3
with:
@ -129,3 +116,55 @@ jobs:
with:
name: autobrr
path: dist/*
docker:
name: Build and publish Docker images
runs-on: self-hosted
needs: web
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download web production build
uses: actions/download-artifact@v3
with:
name: web-build
path: web/build
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/autobrr/autobrr
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and publish image
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.ci
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ github.event.pull_request.head.sha }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}