Skip to content

Commit

Permalink
Got signing and notarization working with entitlements.
Browse files Browse the repository at this point in the history
  • Loading branch information
prmoore77 committed Jan 25, 2024
1 parent ce2c884 commit 99a0889
Showing 1 changed file with 112 additions and 112 deletions.
224 changes: 112 additions & 112 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
strategy:
matrix:
include:
# - platform: amd64
# os: macos
# runner: macos-13
- platform: amd64
os: macos
runner: macos-13
- platform: arm64
os: macos
runner: macos-13-xlarge
Expand Down Expand Up @@ -59,112 +59,112 @@ jobs:
path: |
${{ env.zip_file_name }}
# build-project-linux:
# name: Build Project - Linux
# strategy:
# matrix:
# include:
# - platform: amd64
# os: linux
# runner: buildjet-8vcpu-ubuntu-2204
# - platform: arm64
# os: linux
# runner: buildjet-8vcpu-ubuntu-2204-arm
# runs-on: ${{ matrix.runner }}
# env:
# zip_file_name: flight_sql_cli_${{ matrix.os }}_${{ matrix.platform }}.zip
# steps:
# - name: Checkout
# uses: actions/[email protected]
#
# - name: Install build requirements
# run: |
# sudo apt-get update
# sudo apt-get install -y \
# build-essential \
# ninja-build \
# cmake \
# gcc \
# git \
# libboost-all-dev
# sudo apt-get clean
# sudo rm -rf /var/lib/apt/lists/*
#
# - name: Configure Project
# uses: threeal/[email protected]
# with:
# generator: Ninja
# run-build: true
#
# - name: Zip artifacts
# run: |
# mv build/flight_sql .
# zip -j ${{ env.zip_file_name }} flight_sql
#
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: ${{ env.zip_file_name }}
# path: |
# ${{ env.zip_file_name }}
#
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
#
# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# context: .
# platforms: linux/${{ matrix.platform }}
# file: Dockerfile.ci
# push: ${{ startsWith(github.ref, 'refs/tags/') }}
# tags: |
# ${{ env.DOCKER_IMAGE_NAME }}:latest-${{ matrix.platform }}
# ${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}-${{ matrix.platform }}
# no-cache: true
# provenance: false
#
# create-release:
# name: Create a release
# if: startsWith(github.ref, 'refs/tags/')
# needs: [build-project-macos, build-project-linux]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/[email protected]
#
# - name: Download All Artifacts
# uses: actions/download-artifact@v4
# with:
# path: artifacts
# pattern: flight_sql_cli_*.zip
# merge-multiple: true
#
# - name: Release
# uses: softprops/action-gh-release@v1
# with:
# files: |
# artifacts/flight_sql_cli_*.zip
# LICENSE
#
# update-image-manifest:
# name: Update DockerHub image manifest to include all built platforms
# if: startsWith(github.ref, 'refs/tags/')
# needs: build-project-linux
# runs-on: ubuntu-latest
# steps:
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
#
# - name: Create and push manifest images
# uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab
# with:
# inputs: ${{ env.DOCKER_IMAGE_NAME }}:latest,${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}
# images: ${{ env.DOCKER_IMAGE_NAME }}:latest-amd64,${{ env.DOCKER_IMAGE_NAME }}:latest-arm64
# push: true
build-project-linux:
name: Build Project - Linux
strategy:
matrix:
include:
- platform: amd64
os: linux
runner: buildjet-8vcpu-ubuntu-2204
- platform: arm64
os: linux
runner: buildjet-8vcpu-ubuntu-2204-arm
runs-on: ${{ matrix.runner }}
env:
zip_file_name: flight_sql_cli_${{ matrix.os }}_${{ matrix.platform }}.zip
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install build requirements
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
ninja-build \
cmake \
gcc \
git \
libboost-all-dev
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
- name: Configure Project
uses: threeal/[email protected]
with:
generator: Ninja
run-build: true

- name: Zip artifacts
run: |
mv build/flight_sql .
zip -j ${{ env.zip_file_name }} flight_sql
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.zip_file_name }}
path: |
${{ env.zip_file_name }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/${{ matrix.platform }}
file: Dockerfile.ci
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: |
${{ env.DOCKER_IMAGE_NAME }}:latest-${{ matrix.platform }}
${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}-${{ matrix.platform }}
no-cache: true
provenance: false

create-release:
name: Create a release
if: startsWith(github.ref, 'refs/tags/')
needs: [build-project-macos, build-project-linux]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: flight_sql_cli_*.zip
merge-multiple: true

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/flight_sql_cli_*.zip
LICENSE
update-image-manifest:
name: Update DockerHub image manifest to include all built platforms
if: startsWith(github.ref, 'refs/tags/')
needs: build-project-linux
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Create and push manifest images
uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab
with:
inputs: ${{ env.DOCKER_IMAGE_NAME }}:latest,${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}
images: ${{ env.DOCKER_IMAGE_NAME }}:latest-amd64,${{ env.DOCKER_IMAGE_NAME }}:latest-arm64
push: true

0 comments on commit 99a0889

Please sign in to comment.