Skip to content
Closed
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
129 changes: 0 additions & 129 deletions .circleci/config.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🏗️ Build
on:
push:
branches-ignore:
- main
- aws-codebuild

jobs:
build:
strategy:
matrix:
build_image:
- "ubuntu-24.04"
- "ubuntu-24.04-arm"
alpine:
- "3.21"
php:
- "8.4"
runs-on: ${{ matrix.build_image }}
steps:
- name: ↙️ Checkout
uses: actions/checkout@v4
with:
show-progress: false
- name: 🔑 Generate keys
run: make keys
- name: 🏗️ Build
run: |
ARCH=$(uname -m)
echo "Building alpine ${{ matrix.alpine }} php ${{ matrix.php }} arch ${ARCH}"
make build ARCH=${ARCH} ALPINE=${{ matrix.alpine }} PHP=${{ matrix.php }}
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: 🚀 Release
on:
workflow_dispatch: ~
push:
branches:
- main
- aws-codebuild

jobs:
release:
strategy:
matrix:
build_image:
- "ubuntu-24.04"
- "ubuntu-24.04-arm"
alpine:
- "3.21"
- "3.22"
php:
- "8.4"
runs-on: ${{ matrix.build_image }}
steps:
- name: ↙️ Checkout
uses: actions/checkout@v4
with:
show-progress: false

- name: 🔑 Generate public keys
run: make keys

- name: 🏗️ Build
run: |
ARCH=$(uname -m)
echo "ARCH=${ARCH}" >> $GITHUB_ENV
echo "Building alpine ${{ matrix.alpine }} php ${{ matrix.php }} arch ${ARCH}"
make build ARCH=${ARCH} ALPINE=${{ matrix.alpine }} PHP=${{ matrix.php }}

- name: 🔐 Get AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: 🚀 Publish Packages
run: |
echo "Publishing alpine ${{ matrix.alpine }} php ${{ matrix.php }} arch ${ARCH}"
# aws s3 sync --acl public-read \
# --cache-control "max-age=86400" \
# --delete \
# _output/${{ matrix.alpine }}/php${{ matrix.php }}/${ARCH} \
# s3://package-skpr-io/php-alpine/${{ matrix.alpine }}/php${{ matrix.php }}/${ARCH}
# # Public key for validating repository packages.
# aws s3 cp build/.abuild/skpr.rsa.pub s3://package-skpr-io/php-alpine/skpr.rsa.pub
# - name: ☁️ Invalidate Cloudfront
# run: |
# aws cloudfront create-invalidation \
# --distribution-id ${{ secrets.CLOUDFRONT_ID }} \
# --paths /php-alpine/${{ matrix.alpine }}/php${{ matrix.php }}/*
# - name: 🧹 Clean up
# run: rm -f build/.abuild/skpr.rsa
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ BUILD_IMAGE=skpr-abuild:latest

build: image
# @todo, Make sure keys exist.
docker container run -it -v $(CURDIR)/packages:/packages \
-v $(CURDIR)/_output/$(ALPINE)/php$(PHP):/_output/packages \
$(BUILD_IMAGE) $(PHP) ${ARCH}
docker run -v $(CURDIR)/packages:/packages \
-v $(CURDIR)/_output/$(ALPINE)/php$(PHP):/_output/packages \
$(BUILD_IMAGE) $(PHP) ${ARCH}

image:
docker image build --build-arg ALPINE_VERSION=$(ALPINE) -t $(BUILD_IMAGE) build
Expand Down
Loading