Skip to content

squash v4

squash v4 #8

Workflow file for this run

name: πŸš€ Release
on:
push:
tags: ["*"]
permissions:
contents: write
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: sedaprotocol/seda-data-proxy
jobs:
build-and-push:
name: 🐳 Build and Push Docker Image
runs-on: ubuntu-latest
strategy:
matrix:
target_arch:
- bun-linux-x64-modern
- bun-linux-arm64
include:
- target_arch: bun-linux-x64-modern
platform: linux/amd64
- target_arch: bun-linux-arm64
platform: linux/arm64
steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4
- name: 🏷️ Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=edge,branch=main
- 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: πŸ—οΈ Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: .build/docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
TARGET_ARCH=${{ matrix.target_arch }}
platforms: ${{ matrix.platform }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: ✨ Save image details
run: echo "${{ steps.meta.outputs.tags }}" > image-details.txt
- name: πŸ“¦ Upload image details as artifact
uses: actions/upload-artifact@v3
with:
name: image-details
path: image-details.txt
create-release:
name: πŸ“¦ Create GitHub Release
needs: build-and-push
runs-on: ubuntu-latest
steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4
- name: πŸ“ Generate Changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v5.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
output-file: false
skip-commit: true
skip-tag: true
skip-git-pull: true
git-push: false
- name: πŸ”½ Download image details artifact
uses: actions/download-artifact@v3
with:
name: image-details
path: ./image-details.txt
- name: πŸŽ‰ Create GitHub Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
generateReleaseNotes: true
body: |
${{ steps.changelog.outputs.changelog }}
## Docker Images
The following Docker images were built and published:
```
${{ steps.changelog.outputs.changelog }}
${{ steps.release.outputs.uploaded }}
```
token: ${{ secrets.GITHUB_TOKEN }}