60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
name: Deploy to GHCR
|
|
|
|
# only run most recent workflow in branch
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
build-16:
|
|
name: Build + Publish 16
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: Checkout
|
|
-
|
|
# Add support for more platforms with QEMU (optional)
|
|
# https://github.com/docker/setup-qemu-action
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Log in to GHCR
|
|
run: |
|
|
echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin
|
|
- name: Build and Push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
file: clang-format-16.dockerfile
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64,linux/ppc64le
|
|
tags: |
|
|
ghcr.io/${{ github.repository_owner }}/clang-format-16:latest
|
|
build-8:
|
|
name: Build + Publish 8
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: Checkout
|
|
|
|
- name: Build
|
|
run: |
|
|
docker build -f clang-format-8.dockerfile -t ghcr.io/cwpearson/clang-format-8:latest .
|
|
|
|
- name: Publish to GHCR
|
|
run: |
|
|
echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin
|
|
docker push ghcr.io/cwpearson/clang-format-8:latest
|