forked from prometheus-pve/prometheus-pve-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.28 KB
/
container-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
name: Build and push container image
# yamllint disable-line rule:truthy
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
<<<<<<< HEAD
- uses: actions/checkout@v3
=======
- name: Checkout repository
uses: actions/checkout@v4
>>>>>>> upstream/main
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
uses: docker/metadata-action@v5
id: meta
with:
images: prompve/prometheus-pve-exporter
tags: |
type=pep440,pattern={{version}}
type=pep440,pattern={{major}}.{{minor}}
type=pep440,pattern={{major}}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/arm64,linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}