Skip to content

fix: Deprecated output step #5

fix: Deprecated output step

fix: Deprecated output step #5

Workflow file for this run

name: Build and Release Lido Exporter Docker Image
on:
pull_request:
branches: [main, develop]
push:
tags:
- 'lido-exporter-v*.*.*'
branches:
- fix/lido-exporter-release
permissions:
contents: write
packages: write
jobs:
build:
name: Create and Push Docker Image
runs-on: ubuntu-latest
env:
FULL_VERSION: ${{ github.ref_name }}
steps:
- 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: Extract version
id: extract_version
run: |
echo ${{ env.FULL_VERSION }}
Ver=${{ env.FULL_VERSION }}
echo "version=${Ver#lido-exporter-}" >> $GITHUB_OUTPUT # Updated to use GITHUB_OUTPUT
- 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:${{ steps.extract_version.outputs.version }} # Uses the extracted version
nethermindeth/lido-exporter:latest
build-args: |
VERSION=${{ steps.extract_version.outputs.version }} # Uses the extracted version for build args
- name: Log out of Docker Hub
run: docker logout
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build # This makes the create-release job dependent on the build job
env:
FULL_VERSION: ${{ github.ref_name }} # Same full version
steps:
- name: Extract version
id: extract_version
run: |
Ver=${{ env.FULL_VERSION }}
echo "version=${Ver#lido-exporter-}" >> $GITHUB_OUTPUT # Updated to use GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v4
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.extract_version.outputs.version }} # Uses the extracted version for the release tag
draft: true
prerelease: false
generateReleaseNotes: true