Skip to content

Commit

Permalink
Merge pull request #1 from Ilyes512/use-external-workflows
Browse files Browse the repository at this point in the history
Use external workflow and removed act
  • Loading branch information
Ilyes512 authored Mar 10, 2024
2 parents 88a3a05 + 10c7bb1 commit e949193
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 345 deletions.
3 changes: 0 additions & 3 deletions .actrc

This file was deleted.

162 changes: 0 additions & 162 deletions .github/actions/build-images/action.yml

This file was deleted.

63 changes: 30 additions & 33 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,38 @@ concurrency:
cancel-in-progress: true

jobs:
build-fpm:
build:
uses: Ilyes512/github-actions/.github/workflows/[email protected]
strategy:
matrix:
arch: ['linux/amd64', 'linux/arm64']
name: Build FPM images
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/build-images
with:
arch: ${{ matrix.arch }}
cache-key: ${{ matrix.os }}-buildx-${{ matrix.arch }}-${{ github.ref_name }}-${{ github.sha }}
cache-restore-keys: |
${{ matrix.os }}-buildx-${{ matrix.arch }}-${{ github.ref_name }}-
${{ matrix.os }}-buildx-${{ matrix.arch }}-
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: 'fpm/Dockerfile'
platform:
- linux/amd64
- linux/arm64
docker:
- dockerfile: fpm/Dockerfile
image-name: ghcr.io/${{ github.repository }}
key: fpm
- dockerfile: apache/Dockerfile
image-name: ghcr.io/${{ github.repository }}/apache
key: apache
with:
runner-os: ubuntu-22.04
platform: ${{ matrix.platform }}
image-name: ${{ matrix.docker.image-name }}
dockerfile: ${{ matrix.docker.dockerfile }}
cache-key: ${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}-${{ github.ref_name }}-${{ github.sha }}
cache-restore-keys: |
${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}-${{ github.ref_name }}-
${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}
build-apache:
merge:
uses: Ilyes512/github-actions/.github/workflows/[email protected]
needs: build
strategy:
matrix:
arch: ['linux/amd64', 'linux/arm64']
name: Build Apache images
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/build-images
with:
arch: ${{ matrix.arch }}
cache-key: ${{ matrix.os }}-buildx-${{ matrix.arch }}-${{ github.ref_name }}-${{ github.sha }}
cache-restore-keys: |
${{ matrix.os }}-buildx-${{ matrix.arch }}-${{ github.ref_name }}-
${{ matrix.os }}-buildx-${{ matrix.arch }}-
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: 'apache/Dockerfile'
image-name-suffix: '/apache'
image-name:
- ghcr.io/${{ github.repository }}
- ghcr.io/${{ github.repository }}/apache
with:
runner-os: ubuntu-22.04
image-name: ${{ matrix.image-name }}
66 changes: 31 additions & 35 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,39 @@ concurrency:
cancel-in-progress: true

jobs:
build-fpm:
build:
uses: Ilyes512/github-actions/.github/workflows/[email protected]
strategy:
matrix:
arch: ['linux/amd64', 'linux/arm64']
name: Build FPM image
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/build-images
with:
arch: ${{ matrix.arch }}
cache-key: ${{ matrix.os }}-buildx-${{ matrix.arch }}-pr-${{ github.event.number }}-${{ github.sha }}
cache-restore-keys: |
${{ matrix.os }}-buildx-${{ matrix.arch }}-pr-${{ github.event.number }}-
${{ matrix.os }}-buildx-${{ matrix.arch }}-pr-
${{ matrix.os }}-buildx-${{ matrix.arch }}-main-
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: 'fpm/Dockerfile'
platform:
- linux/amd64
- linux/arm64
docker:
- dockerfile: fpm/Dockerfile
image-name: ghcr.io/${{ github.repository }}
key: fpm
- dockerfile: apache/Dockerfile
image-name: ghcr.io/${{ github.repository }}/apache
key: apache
with:
runner-os: ubuntu-22.04
platform: ${{ matrix.platform }}
image-name: ${{ matrix.docker.image-name }}
dockerfile: ${{ matrix.docker.dockerfile }}
cache-key: ${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}-pr-${{ github.event.number }}-${{ github.sha }}
cache-restore-keys: |
${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}-pr-${{ github.event.number }}-
${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}-pr-
${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}-main-
build-apache:
merge:
uses: Ilyes512/github-actions/.github/workflows/[email protected]
needs: build
strategy:
matrix:
arch: ['linux/amd64', 'linux/arm64']
name: Build Apache image
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/build-images
with:
arch: ${{ matrix.arch }}
cache-key: ${{ matrix.os }}-buildx-${{ matrix.arch }}-pr-${{ github.event.number }}-${{ github.sha }}
cache-restore-keys: |
${{ matrix.os }}-buildx-${{ matrix.arch }}-pr-${{ github.event.number }}-
${{ matrix.os }}-buildx-${{ matrix.arch }}-pr-
${{ matrix.os }}-buildx-${{ matrix.arch }}-main-
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: 'apache/Dockerfile'
image-name-suffix: '/apache'
image-name:
- ghcr.io/${{ github.repository }}
- ghcr.io/${{ github.repository }}/apache
with:
runner-os: ubuntu-22.04
image-name: ${{ matrix.image-name }}
66 changes: 31 additions & 35 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,39 @@ concurrency:
cancel-in-progress: true

jobs:
build-fpm:
build:
uses: Ilyes512/github-actions/.github/workflows/[email protected]
strategy:
matrix:
arch: ['linux/amd64', 'linux/arm64']
name: Build FPM image
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/build-images
with:
arch: ${{ matrix.arch }}
cache-key: ${{ matrix.os }}-buildx-${{ matrix.arch }}-${{ github.ref_name }}-${{ github.sha }}
cache-restore-keys: |
${{ matrix.os }}-buildx-${{ matrix.arch }}-${{ github.ref_name }}-
${{ matrix.os }}-buildx-${{ matrix.arch }}-main-
${{ matrix.os }}-buildx-${{ matrix.arch }}-
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: 'fpm/Dockerfile'
platform:
- linux/amd64
- linux/arm64
docker:
- dockerfile: fpm/Dockerfile
image-name: ghcr.io/${{ github.repository }}
key: fpm
- dockerfile: apache/Dockerfile
image-name: ghcr.io/${{ github.repository }}/apache
key: apache
with:
runner-os: ubuntu-22.04
platform: ${{ matrix.platform }}
image-name: ${{ matrix.docker.image-name }}
dockerfile: ${{ matrix.docker.dockerfile }}
cache-key: ${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}-${{ github.ref_name }}-${{ github.sha }}
cache-restore-keys: |
${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}-${{ github.ref_name }}-
${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}-main-
${{ matrix.os }}-buildx-${{ matrix.platform }}-${{ matrix.docker.key }}-
build-apache:
merge:
uses: Ilyes512/github-actions/.github/workflows/[email protected]
needs: build
strategy:
matrix:
arch: ['linux/amd64', 'linux/arm64']
name: Build Apache image
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/build-images
with:
arch: ${{ matrix.arch }}
cache-key: ${{ matrix.os }}-buildx-${{ matrix.arch }}-${{ github.ref_name }}-${{ github.sha }}
cache-restore-keys: |
${{ matrix.os }}-buildx-${{ matrix.arch }}-${{ github.ref_name }}-
${{ matrix.os }}-buildx-${{ matrix.arch }}-main-
${{ matrix.os }}-buildx-${{ matrix.arch }}-
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: 'apache/Dockerfile'
image-name-suffix: '/apache'
image-name:
- ghcr.io/${{ github.repository }}
- ghcr.io/${{ github.repository }}/apache
with:
runner-os: ubuntu-22.04
image-name: ${{ matrix.image-name }}
Loading

0 comments on commit e949193

Please sign in to comment.