Skip to content

Commit

Permalink
try to patch release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
0xOsiris committed Feb 10, 2025
1 parent 0b3c373 commit b4741be
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: release
name: Release

on:
workflow_dispatch:
push:
branches:
- main
tags:
- v*
- 'v*'

env:
IMAGE_NAME: ${{ github.repository }}
Expand All @@ -16,13 +14,32 @@ env:
permissions:
contents: read
packages: write

jobs:
build-and-push:
runs-on: ubuntu-latest
build:
name: Publish Docker Image
strategy:
matrix:
config:
- platform: linux/amd64
runner: warp-ubuntu-latest-x64-16x
- platform: linux/arm64
runner: warp-ubuntu-latest-arm64-16x
runs-on: ${{ matrix.config.runner }}
steps:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Checkout sources
uses: actions/checkout@v2

- name: Set env
run: |
platform=${{ matrix.config.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Print version
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Log in to Registry
uses: docker/login-action@v3
Expand All @@ -49,14 +66,18 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
id: build
uses: docker/build-push-action@v6
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
VERSION=${{ env.RELEASE_VERSION }}
platforms: ${{ matrix.config.platform }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit b4741be

Please sign in to comment.