af561c2776
Update actions/checkout digest to 11bd719
35 lines
904 B
YAML
35 lines
904 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
|
|
env:
|
|
IMAGE_NAME: docker_state_exporter
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
- 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.GH_ACCESS_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
|
|
|