Files
freebox-prometheus/.gitea/workflows/docker-build.yml
uzurka 6dc28dc63d
Some checks reported warnings
Docker Build / Build Docker image (push) Has been cancelled
Changed: Updated Gitea Actions
2023-08-29 10:40:55 +02:00

64 lines
1.8 KiB
YAML

name: Docker Build
on:
push:
branches:
- main
paths:
- 'Dockerfile'
- 'entrypoint.sh'
- '.gitea/workflows/docker-build.yml'
jobs:
build:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: open the docker socket
run: sudo chmod 666 /var/run/docker.sock
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: uzurka
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build AMD64 Docker image
run: |
docker buildx build \
--file Dockerfile-amd64 \
--tag uzurka/freebox-prometheus:amd64 \
--tag uzurka/freebox-prometheus:amd64-${{ github.sha }} \
--platform linux/amd64 \
--push \
.
- name: Build ARM Docker image
run: |
docker buildx build \
--file Dockerfile-arm \
--tag uzurka/freebox-prometheus:arm \
--tag uzurka/freebox-prometheus:arm-${{ github.sha }} \
--platform linux/arm64,linux/arm/v7 \
--push \
.
- name: push README to Dockerhub
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: uzurka
DOCKER_PASS: ${{ secrets.DOCKER_PASSWORD }}
with:
destination_container_repo: uzurka/freebox-prometheus
provider: dockerhub
short_description: 'A Prometheus exporter for the french ISP routers Freebox'
readme_file: 'README.md'