Skip to content

Commit

Permalink
CI: Verify builds don't break
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jan 13, 2024
1 parent 5c745a8 commit 184ff93
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.pytest_cache
.venv
build
cratedb-prometheus-adapter
25 changes: 25 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Stage builds through GitHub Actions (GHA).
name: Builds

on:
pull_request: ~
push:
branches: [ main ]

# Allow job to be triggered manually.
workflow_dispatch:

# Run builds each night.
schedule:
- cron: '0 5 * * *'

jobs:
docker:
runs-on: ubuntu-latest
steps:

- name: Acquire sources
uses: actions/checkout@v4

- name: Run release job
run: ./devtools/release.sh
10 changes: 7 additions & 3 deletions .github/workflows/release.yml → .github/workflows/oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
# https://github.com/crazy-max/ghaction-docker-meta
# https://github.com/docker/build-push-action
# https://github.com/MarcelCoding/luna/blob/main/.github/workflows/ci.yaml
name: Release
name: OCI

on:
schedule:
- cron: '0 10 * * *' # everyday at 10am
push:
tags:
- '*.*.*'

# Allow job to be triggered manually.
workflow_dispatch:

# Build nightlies.
schedule:
- cron: '0 5 * * *'

env:
GHCR_IMAGE_NAME: crate/cratedb-prometheus-adapter

Expand Down
2 changes: 1 addition & 1 deletion devtools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rm build/*
NAME="cratedb-prometheus-adapter"

# Use most recent git tag as version number.
# TODO: Should this be made more elaborate?
# TODO: Should this be made more elaborate, to also account for patch and nightly releases?
VERSION="$(git tag | tail -n1)"

# Build program for multiple architectures.
Expand Down

0 comments on commit 184ff93

Please sign in to comment.