ci-storage #1256
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
name: ci-storage | |
on: | |
push: | |
paths: | |
- 'storage*/**' | |
- '.github/workflows/ci-storage.yml' | |
- '.github/actions/prepare-bareos-app/*' | |
- '.github/actions/build-bareos-app/*' | |
- '.github/actions/push-bareos-app/*' | |
- '.github/actions/test-bareos-app/*' | |
pull_request: | |
paths: | |
- 'storage*/**' | |
- '.github/workflows/ci-storage.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@v4 | |
- name: Prepare build file | |
uses: ./.github/actions/prepare-bareos-app | |
with: | |
bareos_app: storage | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact-storage-tmp | |
path: build | |
build: | |
needs: prepare | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-artifact-storage-tmp | |
path: build | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v3 | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: all | |
- name: Build images | |
uses: ./.github/actions/build-bareos-app | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact-storage | |
path: build | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-artifact-storage | |
path: build | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v3 | |
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@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-artifact-storage | |
path: build | |
- name: Load and push images | |
uses: ./.github/actions/push-bareos-app | |
with: | |
docker_pass: ${{ secrets.DOCKER_PASS }} |