Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old #154

Closed
wants to merge 8 commits into from
Closed

Old #154

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 0 additions & 123 deletions .github/CONTRIBUTING.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/issue.feature.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/call_issue_pr_tracker.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/call_issues_cron.yml

This file was deleted.

111 changes: 111 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Docker build and Push

on:
push:
paths-ignore:
- ".gihub/**"
pull_request:
paths-ignore:
- ".github/**"
workflow_dispatch:

jobs:
docker-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- name: linux/amd64
file: "Dockerfile"
- name: linux/arm64/v8
file: "Dockerfile.aarch64"

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: thegreatestgiant/calibre
tags: |
${{ github.run_number }}
latest

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push by digest
id: build
uses: docker/build-push-action@v4
with:
context: .
file: ${{ matrix.platform.file }}
platforms: ${{ matrix.platform.name }}
outputs: type=image,name=thegreatestgiant/calibre,push=true,digest=${{ steps.build.outputs.digest }}

- 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:
- docker-build
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: thegreatestgiant/calibre
tags: |
${{ github.run_number }}
latest

- 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 'thegreatestgiant/calibre@sha256:%s ' *)

- name: Inspect image
run: |
docker buildx imagetools inspect thegreatestgiant/calibre:${{ steps.meta.outputs.version }}
13 changes: 0 additions & 13 deletions .github/workflows/greetings.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/workflows/permissions.yml

This file was deleted.

Loading