5753be5613
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
38 lines
961 B
YAML
38 lines
961 B
YAML
|
|
name: Docker build and push
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Build and Test"]
|
|
branches: ["main"]
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
docker-build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
env:
|
|
IMAGE_NAME: docker_state_exporter
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: |
|
|
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
|
|
|