Skip to content

Commit

Permalink
test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Sep 25, 2024
1 parent 31ee7d2 commit 75dae88
Showing 1 changed file with 13 additions and 61 deletions.
74 changes: 13 additions & 61 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,87 +35,39 @@ jobs:
echo "$MATRIX" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
fpm-amd64:
name: PHP FPM ${{ matrix.php }} (amd64)
runs-on: ubuntu-latest
needs: [generate-matrix]
strategy: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

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

- name: Build and Push
uses: docker/build-push-action@v6
with:
tags: ${{ matrix.fpm-image }}-amd64
context: fpm
cache-from: type=gha,scope=fpm-${{ matrix.php }}-amd64
cache-to: type=gha,mode=max,scope=fpm-${{ matrix.php }}-amd64
platforms: linux/amd64
build-args: |
PHP_PATCH_VERSION=${{ matrix.phpPatch }}
PHP_DIGEST=${{ matrix.phpPatchDigest }}
push: true
provenance: false

fpm-arm64:
fpm:
name: PHP FPM ${{ matrix.php }} (arm64)
runs-on: github-hosted-arm64
runs-on: shopware-arm64
container:
image: ghcr.io/catthehacker/ubuntu:act-22.04
needs: [generate-matrix]
strategy: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login into Docker Hub
if: github.ref == 'refs/heads/main'
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin

- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

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

- name: Build and Push
uses: docker/build-push-action@v6
with:
tags: ${{ matrix.fpm-image }}-arm64
tags: |
${{ matrix.fpm-tags }}
context: fpm
cache-from: type=gha,scope=fpm-${{ matrix.php }}-arm64
cache-to: type=gha,mode=max,scope=fpm-${{ matrix.php }}-arm64
platforms: linux/arm64
cache-from: type=gha,scope=fpm-${{ matrix.php }}
cache-to: type=gha,mode=max,scope=fpm-${{ matrix.php }}
platforms: linux/arm64,linux/amd64
build-args: |
PHP_PATCH_VERSION=${{ matrix.phpPatch }}
PHP_DIGEST=${{ matrix.phpPatchDigest }}
push: true
provenance: false

fpm:
name: Merge FPM Manifest
runs-on: ubuntu-latest
needs: [fpm-amd64, fpm-arm64, generate-matrix]
strategy: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Login into Docker Hub
if: github.ref == 'refs/heads/main'
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin

- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

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

- name: Create Manifest
run: |
for image in ${{ matrix.fpm-tags }}; do
docker manifest create $image ${{ matrix.fpm-image }}-amd64 ${{ matrix.fpm-image }}-arm64
docker manifest push $image
done
fpm-otel:
name: PHP FPM ${{ matrix.php }} with OpenTelemetry
runs-on: ubuntu-latest
Expand Down

0 comments on commit 75dae88

Please sign in to comment.