fix: Lido Exporter Release #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release Lido Exporter Docker Image | ||
on: | ||
pull_request: | ||
branches: [main, develop] | ||
permissions: | ||
contents: 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: Extract version from tag | ||
id: extract_version | ||
run: echo "VERSION=${FULL_VERSION#lido-exporter-}" >> $GITHUB_ENV | ||
- 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 | ||
build-args: | | ||
VERSION=${{ env.VERSION }} | ||
- 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 }} | ||
VERSION: ${{ env.VERSION }} | ||
Check failure on line 58 in .github/workflows/lido-exporter.yml GitHub Actions / Build and Release Lido Exporter Docker ImageInvalid workflow file
Check failure on line 58 in .github/workflows/lido-exporter.yml GitHub Actions / Build and Release Lido Exporter Docker ImageInvalid workflow file
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ env.VERSION }} | ||
draft: true | ||
prerelease: false | ||
generateReleaseNotes: true |