fix(workflows): Various fixes and changes #6
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: library/grafana:10.2 | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Everyday at 12AM | |
push: | |
branches: [main] | |
paths: | |
- 'library/grafana/10.2/**' | |
- '.github/workflows/library-grafana10.2.yaml' | |
- '!library/grafana/10.2/README.md' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: [main] | |
paths: | |
- 'library/grafana/10.2/**' | |
- '.github/workflows/library-grafana10.2.yaml' | |
- '!library/grafana/10.2/README.md' | |
# Automatically cancel in-progress actions on the same branch | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- plat: qemu | |
arch: x86_64 | |
- plat: fc | |
arch: x86_64 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build grafana10.2 | |
uses: unikraft/kraftkit@staging | |
with: | |
loglevel: debug | |
workdir: library/grafana/10.2 | |
runtimedir: /github/workspace/.kraftkit | |
plat: ${{ matrix.plat }} | |
arch: ${{ matrix.arch }} | |
push: false | |
output: oci://index.unikraft.io/unikraft.org/grafana:10.2 | |
- name: Archive OCI digests | |
uses: actions/upload-artifact@v3 | |
with: | |
name: oci-digests-${{ matrix.arch }}-${{ matrix.plat }} | |
path: ${{ github.workspace }}/.kraftkit/oci/digests | |
if-no-files-found: error | |
push: | |
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to OCI registry | |
uses: docker/login-action@v2 | |
with: | |
registry: index.unikraft.io | |
username: ${{ secrets.REG_USERNAME }} | |
password: ${{ secrets.REG_TOKEN }} | |
- name: Retrieve, merge and push OCI digests | |
uses: ./.github/actions/merge-oci-digests | |
with: | |
name: index.unikraft.io/unikraft.org/grafana:10.2 | |
push: true |