feat: add alpine image build #49
Workflow file for this run
This file contains hidden or 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
--- | |
name: CI🚦 | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
jobs: | |
setup-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Source checkout | |
uses: actions/checkout@v4 | |
- name: 'Setup yq' | |
uses: dcarbone/[email protected] | |
- id: set-matrix | |
run: echo "matrix=$(yq -o json build_versions.yaml | jq -c)" >> $GITHUB_OUTPUT | |
general_ci: | |
permissions: | |
# required for all workflows | |
security-events: write | |
# only required for workflows in private repositories | |
actions: read | |
contents: read | |
uses: voxpupuli/crafty/.github/workflows/general_ci.yaml@main | |
with: | |
shellcheck_scan_dir: './openvoxserver' | |
build_test_container: | |
name: 'Build test container' | |
runs-on: ubuntu-latest | |
needs: setup-matrix | |
strategy: | |
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Extract server version number | |
id: extract_server_version | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const serverVersion = '${{ matrix.server_version }}'; | |
const server_version = serverVersion.split('-')[0]; | |
core.setOutput('server_version', server_version); | |
- name: Extract db version number | |
id: extract_db_version | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const dbVersion = '${{ matrix.db_version }}'; | |
const db_version = dbVersion.split('-')[0]; | |
core.setOutput('db_version', db_version); | |
- name: Build Ubuntu image | |
uses: docker/build-push-action@v6 | |
with: | |
tags: 'ci/openvoxserver:${{ steps.extract_server_version.outputs.server_version }}' | |
context: openvoxserver | |
file: openvoxserver/Containerfile | |
push: false | |
build-args: | | |
OPENVOX_RELEASE=${{ matrix.release }} | |
OPENVOXSERVER_VERSION=${{ matrix.server_version }} | |
OPENVOXDB_VERSION=${{ matrix.db_version }} | |
R10K_VERSION=${{ matrix.r10k_version }} | |
RUGGED_VERSION=${{ matrix.rugged_version }} | |
- name: Build Alpine image | |
if: ${{ matrix.release == '8' }} | |
uses: docker/build-push-action@v6 | |
with: | |
tags: 'ci/openvoxserver:${{ steps.extract_server_version.outputs.server_version }}-alpine' | |
context: openvoxserver | |
file: openvoxserver/Containerfile.alpine | |
push: false | |
build-args: | | |
OPENVOX_RELEASE=${{ matrix.release }} | |
OPENVOXSERVER_VERSION=${{ steps.extract_server_version.outputs.server_version }} | |
OPENVOXDB_VERSION=${{ steps.extract_db_version.outputs.db_version }} | |
R10K_VERSION=${{ matrix.r10k_version }} | |
tests: | |
needs: | |
- general_ci | |
- build_test_container | |
runs-on: ubuntu-latest | |
name: Test suite | |
steps: | |
- run: echo Test suite completed | |
dependabot: | |
permissions: | |
contents: write | |
name: 'Dependabot auto-merge' | |
needs: | |
- tests | |
runs-on: ubuntu-latest | |
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} | |
steps: | |
- name: Dependabot metadata | |
id: metadata | |
uses: dependabot/[email protected] | |
with: | |
github-token: '${{ secrets.GITHUB_TOKEN }}' | |
- name: Enable auto-merge for Dependabot PRs | |
run: gh pr merge --auto --merge "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |