Skip to content

Commit

Permalink
chore: Downgrade to stable bun image
Browse files Browse the repository at this point in the history
  • Loading branch information
kaynetik committed Oct 28, 2024
1 parent 86a73e9 commit 3e10beb
Showing 1 changed file with 15 additions and 51 deletions.
66 changes: 15 additions & 51 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
strategy:
matrix:
target_arch:
- bun-linux-x64-modern
- bun-linux-x64
- bun-linux-arm64
include:
- target_arch: bun-linux-x64-modern
- target_arch: bun-linux-x64
platform: linux/amd64
arch: amd64
os: linux
Expand All @@ -45,6 +45,15 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
labels: |
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
org.opencontainers.image.description=Data Proxy Service for Seda Protocol
org.opencontainers.image.version=${{ steps.meta.outputs.version }}
org.opencontainers.image.architecture=${{ matrix.arch }}
org.opencontainers.image.source=${{ github.repository }}
org.opencontainers.image.url=https://github.com/${{ github.repository }}
org.opencontainers.image.created=${{ steps.meta.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
- name: πŸ› οΈ Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -64,62 +73,18 @@ jobs:
push: true
tags: |
${{ steps.meta.outputs.tags }}-${{ matrix.target_arch }}
labels: |
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
org.opencontainers.image.description=Data Proxy Service for Seda Protocol
org.opencontainers.image.version=${{ github.ref_name }}
org.opencontainers.image.architecture=${{ matrix.arch }}
org.opencontainers.image.os=${{ matrix.os }}
org.opencontainers.image.source=${{ github.repository }}
org.opencontainers.image.url=https://github.com/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}
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

create-manifest:
name: πŸ“ Create and Push Multi-arch Manifest
needs: build-and-push
runs-on: ubuntu-latest
steps:
- name: πŸ” Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: πŸ”„ Create and push manifest
run: |
# Create and push the manifest for each tag pattern
for tag in $(echo "${{ github.ref_name }}" "v${VERSION}" "v${MAJOR}.${MINOR}" "v${MAJOR}"); do
docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${tag} \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${tag}-bun-linux-x64-modern \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${tag}-bun-linux-arm64
# Annotate the manifest with architecture and OS information
docker manifest annotate ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${tag} \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${tag}-bun-linux-x64-modern \
--os linux --arch amd64
docker manifest annotate ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${tag} \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${tag}-bun-linux-arm64 \
--os linux --arch arm64
# Push the manifest
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${tag}
done
env:
VERSION: $(echo ${{ github.ref_name }} | sed 's/^v//')
MAJOR: $(echo ${{ github.ref_name }} | sed 's/^v//' | cut -d. -f1)
MINOR: $(echo ${{ github.ref_name }} | sed 's/^v//' | cut -d. -f2)

create-release:
name: πŸ“¦ Create GitHub Release
needs: create-manifest
needs: build-and-push
runs-on: ubuntu-latest

steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -148,7 +113,6 @@ jobs:
## Docker Images
The following Docker images were built and published to GHCR:
- [ghcr.io/sedaprotocol/seda-data-proxy:${{ github.ref_name }}](https://ghcr.io/sedaprotocol/seda-data-proxy:${{ github.ref_name }}) (multi-arch)
- [ghcr.io/sedaprotocol/seda-data-proxy:${{ github.ref_name }}-bun-linux-x64-modern](https://ghcr.io/sedaprotocol/seda-data-proxy:${{ github.ref_name }}-bun-linux-x64-modern)
- [ghcr.io/sedaprotocol/seda-data-proxy:${{ github.ref_name }}-bun-linux-x64](https://ghcr.io/sedaprotocol/seda-data-proxy:${{ github.ref_name }}-bun-linux-x64)
- [ghcr.io/sedaprotocol/seda-data-proxy:${{ github.ref_name }}-bun-linux-arm64](https://ghcr.io/sedaprotocol/seda-data-proxy:${{ github.ref_name }}-bun-linux-arm64)
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 3e10beb

Please sign in to comment.