fix: add nix module option to specify postgres package #634
Workflow file for this run
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: Build GHCR images | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "**/*" | |
- "!.github/**" # Important: Exclude PRs related to .github from auto-run | |
- "!.github/workflows/**" # Important: Exclude PRs related to .github from auto-run | |
branches: ["ci"] | |
pull_request_target: | |
branches: ["master", "ci"] | |
paths: | |
- "**/*" | |
- "!.github/**" # Important: Exclude PRs related to .github from auto-run | |
- "!.github/workflows/**" # Important: Exclude PRs related to .github from auto-run | |
env: | |
REGISTRY_IMAGE: ghcr.io/${{ github.repository }} | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
check_paths: | |
runs-on: ubuntu-latest | |
outputs: | |
githubfolder: ${{ steps.filter.outputs.githubfolder }} | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
id: filter | |
with: | |
filters: | | |
githubfolder: | |
- '.github/**' | |
teslamate_build: | |
name: Build images | |
needs: check_paths | |
if: needs.check_paths.outputs.githubfolder == 'false' | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: "linux/amd64" | |
runs_on: "ubuntu-latest" | |
cache_id: amd64 | |
- platform: "linux/arm/v7" | |
runs_on: "buildjet-2vcpu-ubuntu-2204-arm" | |
cache_id: arm | |
- platform: "linux/arm64" | |
runs_on: "buildjet-2vcpu-ubuntu-2204-arm" | |
cache_id: arm64 | |
runs-on: ${{ matrix.runs_on }} | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
if: ${{ github.event_name != 'pull_request_target' }} | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
if: ${{ github.event_name == 'pull_request_target' }} | |
with: | |
ref: ${{github.event.pull_request.head.ref}} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
- name: Buildx | |
uses: ./.github/actions/build | |
with: | |
docker_password: ${{ secrets.DOCKER_PASSWORD }} | |
repository_owner: ${{ github.repository_owner }} | |
repository: ${{ github.repository }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
version: ${{ github.ref_name }} | |
labels: | | |
org.opencontainers.image.version=${{ github.ref || github.ref_name }} | |
teslamate_merge: | |
name: Merge GHCR images | |
needs: | |
- check_paths | |
- teslamate_build | |
if: needs.check_paths.outputs.githubfolder == 'false' | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Merge | |
id: merge | |
uses: ./.github/actions/merge | |
with: | |
image: ${{ env.REGISTRY_IMAGE }} | |
grafana: | |
needs: check_paths | |
if: needs.check_paths.outputs.githubfolder == 'false' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
if: ${{ github.event_name != 'pull_request_target' }} | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
if: ${{ github.event_name == 'pull_request_target' }} | |
with: | |
ref: ${{github.event.pull_request.head.ref}} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: ./.github/actions/grafana | |
with: | |
image: ${{ env.REGISTRY_IMAGE }}/grafana | |
labels: | | |
org.opencontainers.image.version=${{ github.ref || github.ref_name }} |