Skip to content

Commit

Permalink
.github/workflows/pkg-*.yml: use build-pkg workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
classabbyamp committed Aug 9, 2023
1 parent 7732386 commit 7632ec8
Show file tree
Hide file tree
Showing 9 changed files with 161 additions and 231 deletions.
46 changes: 33 additions & 13 deletions .github/workflows/infradocs.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,54 @@
name: infradocs

on:
pull_request:
paths:
- docs/**
push:
branches:
- master
paths:
- 'docs/**'
- docs/**

jobs:
main:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout repo
uses: classabbyamp/treeless-checkout-action@v1
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
submodules: false
images: |
ghcr.io/${{ github.repository_owner }}/infradocs
tags: |
type=sha,prefix=
type=raw,value=latest,enable={{is_default_branch}}
flavor: latest=false
labels: |
org.opencontainers.image.authors=Void Linux team and contributors
org.opencontainers.image.url=https://voidlinux.org
org.opencontainers.image.documentation=https://infradocs.voidlinux.org
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.vendor=Void Linux
org.opencontainers.image.title=Void Linux infrastructure documentation
org.opencontainers.image.description=infrastructure documentation image for Void Linux
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Login to GCHR
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: void-robot
password: ${{ secrets.CR_PAT }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
push: true
tags: "ghcr.io/void-linux/infradocs:${{github.sha}}"
context: docs
push: ${{ endsWith(github.ref, 'master') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
45 changes: 16 additions & 29 deletions .github/workflows/pkg-alps.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
name: alps Service Container
on:
workflow_dispatch:
inputs:
version:
description: "Version tag"
required: true
pull_request:
paths:
- services/pkg/alps/**
push:
branches:
- master
paths:
- services/pkg/alps/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GCHR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: services/pkg/alps
push: true
tags: "ghcr.io/void-linux/infra-alps:${{ github.event.inputs.version }}"
build-args: |
ALPS_REV=${{ github.event.inputs.version }}
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
uses: ./.github/workflows/pkg-build.yml
with:
service_name: alps
push: ${{ endsWith(github.ref, 'master') }}
43 changes: 16 additions & 27 deletions .github/workflows/pkg-lego.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
name: LEGO Service Container
on:
workflow_dispatch:
inputs:
version:
description: "Version tag"
required: true
pull_request:
paths:
- services/pkg/lego/**
push:
branches:
- master
paths:
- services/pkg/lego/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GCHR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: services/pkg/lego
push: true
tags: "ghcr.io/void-linux/infra-lego:${{ github.event.inputs.version }}"
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
uses: ./.github/workflows/pkg-build.yml
with:
service_name: lego
push: ${{ endsWith(github.ref, 'master') }}
43 changes: 16 additions & 27 deletions .github/workflows/pkg-man-cgi.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
name: man-cgi Service Container
on:
workflow_dispatch:
inputs:
version:
description: "Version tag"
required: true
pull_request:
paths:
- services/pkg/man-cgi/**
push:
branches:
- master
paths:
- services/pkg/man-cgi/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GCHR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: services/pkg/man-cgi
push: true
tags: "ghcr.io/void-linux/infra-man-cgi:${{ github.event.inputs.version }}"
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
uses: ./.github/workflows/pkg-build.yml
with:
service_name: man-cgi
push: ${{ endsWith(github.ref, 'master') }}
43 changes: 16 additions & 27 deletions .github/workflows/pkg-nginx.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
name: NGINX Service Container
on:
workflow_dispatch:
inputs:
version:
description: "Version tag"
required: true
pull_request:
paths:
- services/pkg/nginx/**
push:
branches:
- master
paths:
- services/pkg/nginx/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GCHR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: services/pkg/nginx
push: true
tags: "ghcr.io/void-linux/infra-nginx:${{ github.event.inputs.version }}"
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
uses: ./.github/workflows/pkg-build.yml
with:
service_name: nginx
push: ${{ endsWith(github.ref, 'master') }}
43 changes: 16 additions & 27 deletions .github/workflows/pkg-rspamd.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
name: rspamd Service Container
on:
workflow_dispatch:
inputs:
version:
description: "Version tag"
required: true
pull_request:
paths:
- services/pkg/rspamd/**
push:
branches:
- master
paths:
- services/pkg/rspamd/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GCHR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: services/pkg/rspamd
push: true
tags: "ghcr.io/void-linux/infra-rspamd:${{ github.event.inputs.version }}"
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
uses: ./.github/workflows/pkg-build.yml
with:
service_name: rspamd
push: ${{ endsWith(github.ref, 'master') }}
43 changes: 16 additions & 27 deletions .github/workflows/pkg-rsync.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
name: RSync Service Container
on:
workflow_dispatch:
inputs:
version:
description: "Version tag"
required: true
pull_request:
paths:
- services/pkg/rsync/**
push:
branches:
- master
paths:
- services/pkg/rsync/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GCHR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: services/pkg/rsync
push: true
tags: "ghcr.io/void-linux/infra-rsync:${{ github.event.inputs.version }}"
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
uses: ./.github/workflows/pkg-build.yml
with:
service_name: rsync
push: ${{ endsWith(github.ref, 'master') }}
Loading

0 comments on commit 7632ec8

Please sign in to comment.