Skip to content

Commit

Permalink
feat: Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pigri committed Sep 7, 2024
1 parent 8adca40 commit b1680cc
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Release

on:
push:
branches:
- release/**
jobs:
core-release:
runs-on: ubuntu-latest
steps:
- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all

- name: 🏗 Setup repo
uses: actions/checkout@v4

- name: Set up Docker Context for Buildx
run: docker context create builders

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
endpoint: builders

- name: Docker meta
id: openshield
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/openshieldai/openshield/openshield
tags: |
type=sha
type=raw,value=latest
- name: Build
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/arm64,linux/amd64
push: true
tags: ${{ steps.api.outputs.tags }}
labels: ${{ steps.api.outputs.labels }}

rule-service-release:
runs-on: ubuntu-latest
steps:
- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all

- name: 🏗 Setup repo
uses: actions/checkout@v4

- name: Set up Docker Context for Buildx
run: docker context create builders

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
endpoint: builders

- name: Docker meta
id: rule-service
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/openshieldai/openshield/rule-service
tags: |
type=sha
type=raw,value=latest
- name: Build
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/arm64,linux/amd64
push: true
tags: ${{ steps.api.outputs.tags }}
labels: ${{ steps.api.outputs.labels }}

0 comments on commit b1680cc

Please sign in to comment.