Skip to content

Commit

Permalink
Optimize CI usage (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladgh authored Jun 17, 2021
1 parent fcc1875 commit af43643
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 132 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build

on:
schedule:
- cron: '2 2 * * *'
push:
branches:
- '*'
tags:
- 'v*.*.*'
pull_request:
branches:
- '*'

jobs:
build:
name: "Build ${{ matrix.image.name }}"
runs-on: ubuntu-latest
strategy:
matrix:
image:
- name: vladgh/gpg
path: gpg
platforms: linux/amd64
- name: vladgh/minidlna
path: minidlna
platforms: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8
- name: vladgh/s3sync
path: s3sync
platforms: linux/amd64
steps:
- name: Checkout
uses: actions/[email protected]
- name: Docker Metadata
uses: docker/[email protected]
id: meta
with:
images: ${{ matrix.image.name }}
tags: |
type=schedule,pattern=nightly
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
type=sha
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker BuildX
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
context: ${{ matrix.image.path }}
platforms: ${{ matrix.image.platforms }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ github.event_name != 'pull_request' }}
84 changes: 0 additions & 84 deletions .github/workflows/ci.yml

This file was deleted.

16 changes: 0 additions & 16 deletions gpg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,3 @@ RUN apk --no-cache add gnupg haveged tini
# Entrypoint
ENTRYPOINT ["/sbin/tini", "--", "gpg"]
CMD ["--version"]

# Metadata params
ARG VERSION
ARG VCS_URL
ARG VCS_REF
ARG BUILD_DATE

# Metadata
LABEL org.opencontainers.image.title="VGH GPG" \
org.opencontainers.image.url="$VCS_URL" \
org.opencontainers.image.authors="Vlad Ghinea" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.version="$VERSION" \
org.opencontainers.image.source="$VCS_URL" \
org.opencontainers.image.revision="$VCS_REF" \
org.opencontainers.image.created="$BUILD_DATE"
16 changes: 0 additions & 16 deletions minidlna/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,3 @@ ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
# Health check
HEALTHCHECK --interval=10s --timeout=10s --retries=6 CMD \
curl --silent --fail localhost:8200 || exit 1

# Metadata params
ARG VERSION
ARG VCS_URL
ARG VCS_REF
ARG BUILD_DATE

# Metadata
LABEL org.opencontainers.image.title="VGH MiniDLNA" \
org.opencontainers.image.url="$VCS_URL" \
org.opencontainers.image.authors="Vlad Ghinea" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.version="$VERSION" \
org.opencontainers.image.source="$VCS_URL" \
org.opencontainers.image.revision="$VCS_REF" \
org.opencontainers.image.created="$BUILD_DATE"
16 changes: 0 additions & 16 deletions s3sync/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,3 @@ RUN apk --no-cache add aws-cli bash findutils groff less tini inotify-tools
# Entrypoint
COPY entrypoint.sh /
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]

# Metadata params
ARG VERSION
ARG VCS_URL
ARG VCS_REF
ARG BUILD_DATE

# Metadata
LABEL org.opencontainers.image.title="VGH AWS S3 Sync" \
org.opencontainers.image.url="$VCS_URL" \
org.opencontainers.image.authors="Vlad Ghinea" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.version="$VERSION" \
org.opencontainers.image.source="$VCS_URL" \
org.opencontainers.image.revision="$VCS_REF" \
org.opencontainers.image.created="$BUILD_DATE"

0 comments on commit af43643

Please sign in to comment.