Skip to content

Updating the neutron image for supporting the networking-baremetal plugin #241

Updating the neutron image for supporting the networking-baremetal plugin

Updating the neutron image for supporting the networking-baremetal plugin #241

---
name: Build and Push OpenStack Exporter to GHCR
on:
push:
branches:
- main
pull_request:
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}/openstack-exporter
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ContainerFiles/openstack-exporter
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: EXPORTER_PORT=49152 # Default, overridden by env in deployment