This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
Merge pull request #1 from consensys-vertical-apps/feat/add-pipeline #1
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: release | |
permissions: | |
id-token: write | |
contents: write | |
issues: write | |
pull-requests: write | |
on: | |
push: | |
branches: | |
- "main" | |
- "release-**" | |
env: | |
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} | |
jobs: | |
release: | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Semantic Release Version | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
extra_plugins: | | |
@semantic-release/[email protected] | |
@semantic-release/[email protected] | |
dry_run: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
- name: Build discv4-crawl | |
if: steps.semantic.outputs.new_release_version != '' | |
run: make build | |
env: | |
VERSION: ${{ steps.semantic.outputs.new_release_version }} | |
- name: Set up Docker Buildx | |
if: steps.semantic.outputs.new_release_version != '' | |
uses: docker/setup-buildx-action@v2 | |
- name: Set up QEMU | |
if: steps.semantic.outputs.new_release_version != '' | |
uses: docker/setup-qemu-action@v2 | |
- name: Login to Docker Registry | |
if: steps.semantic.outputs.new_release_version != '' | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ env.DOCKER_REGISTRY }} | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build & Publish image | |
if: steps.semantic.outputs.new_release_version != '' | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
tags: ${{env.DOCKER_REGISTRY}}/staking/discv4-crawl:${{ steps.semantic.outputs.new_release_version }} | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
cache-from: type=gha | |
#cache-to: type=gha,mode=max | |
- name: Semantic Release | |
if: steps.semantic.outputs.new_release_version != '' | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
extra_plugins: | | |
@semantic-release/[email protected] | |
@semantic-release/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} |