-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build image and push on merge (#167)
* [CI] build libks image when pushed to master * updated to use pr-mpt/actions-commit-hash@v2 * added mkissing new line in Dockerfile --------- Co-authored-by: Aye Min Aung <ayemin@signalwire.com>
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
- "min/build-image" | ||
workflow_call: | ||
secrets: | ||
# Secrets used to build | ||
DOCKERHUB_USERNAME: | ||
required: true | ||
DOCKERHUB_TOKEN: | ||
required: true | ||
GH_BOT_DEPLOY_KEY: | ||
required: true | ||
|
||
jobs: | ||
hash: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
HASH: ${{ steps.hash.outputs.short }} | ||
steps: | ||
- id: hash | ||
uses: pr-mpt/actions-commit-hash@v2 | ||
with: | ||
# NOTE: since this workflow is only triggered by `push` event | ||
# github.sha have correct commit sha | ||
commit: ${{ github.sha }} | ||
build: | ||
needs: hash | ||
strategy: | ||
matrix: | ||
include: | ||
- tag: libks-libs10-${{ needs.hash.outputs.HASH }} | ||
baseimage: "signalwire/freeswitch-base:debian-10" | ||
- tag: libks-libs11-${{ needs.hash.outputs.HASH }} | ||
baseimage: "signalwire/freeswitch-base:debian-11" | ||
name: "build libks" | ||
uses: signalwire/actions-template/.github/workflows/ci-build.yml@main | ||
with: | ||
CONTAINER_SCAN: true | ||
CONTAINER_TEST: false | ||
PROJECT_NAME: "freeswitch-libs" | ||
FILE: ./Dockerfile | ||
PUSH: true | ||
RUNNER: ubuntu-latest | ||
TAG: ${{ matrix.tag }} | ||
BUILD_ARGS: | | ||
BASEIMAGE=${{ matrix.baseimage }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG BASE_IMAGE=signalwire/freeswitch-base:debian-10 | ||
FROM ${BASE_IMAGE} | ||
|
||
RUN apt-get update && apt-get install -yq build-essential autotools-dev lsb-release pkg-config automake autoconf libtool-bin clang-tools-7 | ||
RUN apt-get install -yq cmake uuid-dev libssl-dev | ||
|
||
RUN mkdir -p /sw/libks | ||
|
||
WORKDIR /sw/libks | ||
|
||
COPY . . | ||
|
||
RUN sed -i -e 's/GIT_FOUND AND GZIP_CMD AND DATE_CMD/WE_DO_NOT_WANT_A_DEBIAN_PACKAGE_THANK_YOU/' CMakeLists.txt && cmake . -DCMAKE_INSTALL_PREFIX=/usr -DWITH_LIBBACKTRACE=1 && make install |