revert github actions
revert github actions
This commit is contained in:
parent
9f0642621f
commit
2e3216019b
3 changed files with 15 additions and 76 deletions
88
.github/workflows/docker_build_push.yml
vendored
88
.github/workflows/docker_build_push.yml
vendored
|
|
@ -12,12 +12,6 @@ env:
|
|||
jobs:
|
||||
build_and_push:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -46,7 +40,7 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Release build and push by digest
|
||||
- name: Release build and push
|
||||
if: ${{ env.BRANCH == 'main' }}
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
|
|
@ -55,11 +49,10 @@ jobs:
|
|||
tags: |
|
||||
${{ env.REGISTRY_IMAGE }}:latest
|
||||
file: ./docker/Dockerfile
|
||||
cache-from: type=gha,scope=${{ matrix.platform }}-latest
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}-latest
|
||||
platforms: ${{ matrix.platform }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
platforms: linux/amd64,linux/arm64
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
|
||||
- name: Release build and push slim
|
||||
if: ${{ env.BRANCH == 'main' }}
|
||||
|
|
@ -73,11 +66,10 @@ jobs:
|
|||
messense/rust-musl-cross:amd64-musl=docker-image://messense/rust-musl-cross:x86_64-musl
|
||||
messense/rust-musl-cross:arm64-musl=docker-image://messense/rust-musl-cross:aarch64-musl
|
||||
file: ./docker/Dockerfile.slim
|
||||
cache-from: type=gha,scope=${{ matrix.platform }}-latest-slim
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}-latest-slim
|
||||
platforms: ${{ matrix.platform }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
platforms: linux/amd64,linux/arm64
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
|
||||
- name: Nightly build and push
|
||||
if: ${{ env.BRANCH == 'develop' }}
|
||||
|
|
@ -88,11 +80,10 @@ jobs:
|
|||
tags: |
|
||||
${{ env.REGISTRY_IMAGE }}:nightly
|
||||
file: ./docker/Dockerfile
|
||||
cache-from: type=gha,scope=${{ matrix.platform }}-nightly
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}-nightly
|
||||
platforms: ${{ matrix.platform }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
platforms: linux/amd64,linux/arm64
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
|
||||
- name: Nightly build and push slim
|
||||
if: ${{ env.BRANCH == 'develop' }}
|
||||
|
|
@ -106,60 +97,7 @@ jobs:
|
|||
messense/rust-musl-cross:amd64-musl=docker-image://messense/rust-musl-cross:x86_64-musl
|
||||
messense/rust-musl-cross:arm64-musl=docker-image://messense/rust-musl-cross:aarch64-musl
|
||||
file: ./docker/Dockerfile.slim
|
||||
cache-from: type=gha,scope=${{ matrix.platform }}-nightly-slim
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}-nightly-slim
|
||||
platforms: ${{ matrix.platform }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
platforms: linux/amd64,linux/arm64
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
|
||||
|
||||
- name: Export digest
|
||||
run: |
|
||||
mkdir -p /tmp/digests
|
||||
digest="${{ steps.build.outputs.digest }}"
|
||||
touch "/tmp/digests/${digest#sha256:}"
|
||||
|
||||
- name: Upload digest
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: digests
|
||||
path: /tmp/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build_and_push
|
||||
steps:
|
||||
-
|
||||
name: Download digests
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: digests
|
||||
path: /tmp/digests
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY_IMAGE }}
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Create manifest list and push
|
||||
working-directory: /tmp/digests
|
||||
run: |
|
||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
||||
-
|
||||
name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
FROM ubuntu:22.04 AS base
|
||||
LABEL maintainer="Jun Kurihara"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
########################################
|
||||
FROM --platform=$BUILDPLATFORM messense/rust-musl-cross:${TARGETARCH}-musl AS builder
|
||||
|
||||
LABEL maintainer="Jun Kurihara"
|
||||
|
||||
ARG TARGETARCH
|
||||
|
||||
RUN if [ $TARGETARCH = "amd64" ]; then \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue