Skip to content

CI

CI #1051

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: 1 1 * * *
jobs:
check-commits:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-python@v4
- name: Install tox
run: python -m pip install tox
- name: Run gitlint
run: tox -e gitlint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build test container
run: docker build -t sambacc:ci tests/container/ -f tests/container/Containerfile
- name: Run test container
run: docker run -v $PWD:/var/tmp/build/sambacc sambacc:ci
test-centos-stream9:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build test container
run: docker build --build-arg=SAMBACC_BASE_IMAGE=quay.io/centos/centos:stream9 -t sambacc:ci-cs9 tests/container/ -f tests/container/Containerfile
- name: Run test container
run: docker run -v $PWD:/var/tmp/build/sambacc sambacc:ci-cs9
test-fedora37:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build test container
run: docker build --build-arg=SAMBACC_BASE_IMAGE=registry.fedoraproject.org/fedora:37 -t sambacc:ci-fc37 tests/container/ -f tests/container/Containerfile
- name: Run test container
run: docker run -v $PWD:/var/tmp/build/sambacc sambacc:ci-fc37
push:
needs: [test]
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'samba-in-kubernetes/sambacc'
steps:
- uses: actions/checkout@v3
- name: log in to quay.io
run: docker login -u "${{ secrets.QUAY_USER }}" -p "${{ secrets.QUAY_PASS }}" quay.io
- name: build container image
run: docker build -t quay.io/samba.org/sambacc:latest tests/container -f tests/container/Containerfile
- name: publish container image
run: docker push quay.io/samba.org/sambacc:latest