Skip to content

ci-director

ci-director #808

Workflow file for this run

name: ci-director
on:
push:
paths:
- 'director*/**'
- '.github/workflows/ci-director.yml'
- '.github/actions/prepare-bareos-app/*'
- '.github/actions/build-bareos-app/*'
- '.github/actions/push-bareos-app/*'
- '.github/actions/test-bareos-app/*'
pull_request:
paths:
- 'director*/**'
- '.github/workflows/ci-director.yml'
- '.github/actions/prepare-bareos-app/*'
- '.github/actions/build-bareos-app/*'
- '.github/actions/push-bareos-app/*'
- '.github/actions/test-bareos-app/*'
workflow_dispatch:
schedule:
- cron: '35 5 * * *'
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare build file
uses: ./.github/actions/prepare-bareos-app
with:
bareos_app: director
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: build-artifact-director
path: build
build:
needs: prepare
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: build-artifact-director
path: build
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Build images
uses: ./.github/actions/build-bareos-app
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: build-artifact-director
path: build
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: build-artifact-director
path: build
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Load and test images
uses: ./.github/actions/test-bareos-app
deploy:
needs: test
if: |
(github.event_name == 'push' || github.event_name == 'schedule') &&
github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: build-artifact-director
path: build
- name: Load and push images
uses: ./.github/actions/push-bareos-app
with:
docker_pass: ${{ secrets.DOCKER_PASS }}