-
Notifications
You must be signed in to change notification settings - Fork 46
73 lines (60 loc) · 1.71 KB
/
lido-exporter.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build and Release Lido Exporter Docker Image
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to release (e.g., lido-exporter-v1.2.3)'
required: true
permissions:
contents: write
jobs:
build:
name: Create and Push Docker Image
runs-on: ubuntu-latest
env:
TAG: ${{ github.event.inputs.tag }}
steps:
- name: Extract version
id: extract_version
shell: bash
run: |
VERSION=${TAG#lido-exporter-}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./cmd/lido-exporter/Dockerfile
push: true
tags: |
nethermindeth/lido-exporter:${{ env.VERSION }}
nethermindeth/lido-exporter:latest
- name: Log out of Docker Hub
run: docker logout
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build
env:
TAG: ${{ github.event.inputs.tag }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ env.TAG }}
draft: true
prerelease: false
generateReleaseNotes: true