Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
spilin committed Dec 6, 2024
1 parent 73f48ce commit 867a1a4
Show file tree
Hide file tree
Showing 21 changed files with 113 additions and 40 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Docker Image

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true
release:
types: [created]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
VERSION: ${{ github.event.inputs.tag || github.event.release.tag_name || '' }}

jobs:
build-and-push:
runs-on: k8s-infrastructure-dind

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Check if VERSION follows the x.x.x format
run: |
if [[ "${{ env.VERSION }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "LATEST_TAG_ENABLED=true" >> $GITHUB_ENV
else
echo "LATEST_TAG_ENABLED=false" >> $GITHUB_ENV
fi
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=semver,pattern={{version}},value=${{ env.VERSION }}
type=raw,value=latest,enable=${{ env.LATEST_TAG_ENABLED == 'true' }}
type=raw,value=testnet
flavor: |
latest=false
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VERSION=${{ env.VERSION }}
4 changes: 2 additions & 2 deletions .github/workflows/release-arbitrum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Arbitrum

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-blackfort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Blackfort

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-celo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Celo

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-eth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Ethereum

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-filecoin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Filecoin

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-fuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Fuse

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-gnosis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Gnosis Chain

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-optimism.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Optimism

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-polygon-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Polygon Edge

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-polygon-zkevm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Polygon zkEVM

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-redstone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Redstone

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-rootstock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Rootstock

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-scroll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Scroll

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-shibarium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Shibarium

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-stability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Stability

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-suave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for SUAVE

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-zetachain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Zetachain

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-zilliqa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for Zilliqa

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-zksync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release for ZkSync

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release

on:
workflow_dispatch:
release:
types: [published]
# release:
# types: [published]

env:
OTP_VERSION: ${{ vars.OTP_VERSION }}
Expand Down

0 comments on commit 867a1a4

Please sign in to comment.