Skip to content

feat: add arm and manfiests to dist #106

feat: add arm and manfiests to dist

feat: add arm and manfiests to dist #106

Workflow file for this run

name: build-and deploy
on:
pull_request: {}
release:
types: [published]
push:
branches:
- main
jobs:
# Only build arm image on merge, takes too long otherwise
build-arm:
if: (github.event_name != 'pull_request')
runs-on: ubuntu-latest
name: make and build arm
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: ^1.22
- name: GHCR Login
if: (github.event_name != 'pull_request')
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Add custom buildx ARM builder
run: |
docker buildx create --name armbuilder
docker buildx use armbuilder
docker buildx inspect --bootstrap
- name: Deploy Container
run: make arm-deploy
- name: Deploy ARM Container
run: |
make manager-arm
docker push ghcr.io/converged-computing/state-machine-operator:manager-arm
build-manager:
permissions:
packages: write
runs-on: ubuntu-latest
env:
container: ghcr.io/converged-computing/state-machine-operator
name: build state machine operator manager
steps:
- uses: actions/checkout@v4
- name: Build Container
run: make manager
- name: Tag Release Image
if: (github.event_name == 'release')
run: |
tag=${GITHUB_REF#refs/tags/}
echo "Tagging and releasing ${{ env.container}}:manager-${tag}"
docker tag ${{ env.container }}:latest ${{ env.container }}:manager-${tag}
- name: GHCR Login
if: (github.event_name != 'pull_request')
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Container
if: (github.event_name != 'pull_request')
run: docker push ${{ env.container }} --all-tags
build-state-machine-operator:
permissions:
packages: write
runs-on: ubuntu-latest
env:
container: ghcr.io/converged-computing/state-machine-operator
name: build state machine operator controller
steps:
- uses: actions/checkout@v4
- name: Build Container
run: make docker-build
- name: Tag Release Image
if: (github.event_name == 'release')
run: |
tag=${GITHUB_REF#refs/tags/}
echo "Tagging and releasing ${{ env.container}}:${tag}"
docker tag ${{ env.container }}:latest ${{ env.container }}:${tag}
- name: GHCR Login
if: (github.event_name != 'pull_request')
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Container
if: (github.event_name != 'pull_request')
run: docker push ${{ env.container }} --all-tags