Skip to content

oras operator tag and release #2

oras operator tag and release

oras operator tag and release #2

Workflow file for this run

name: oras operator tag and release
on:
workflow_dispatch:
inputs:
release_tag:
description: Custom release tag
type: string
required: true
jobs:
build-arm:
runs-on: ubuntu-latest
name: make and build arm
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set tag
run: |
echo "Tag for release is ${{ inputs.release_tag }}"
echo "tag=${{ inputs.release_tag }}" >> ${GITHUB_ENV}
- uses: actions/setup-go@v3
with:
go-version: ^1.19
- name: GHCR Login
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
env:
tag: ${{ env.tag }}
run: make arm-deploy ARMIMG=ghcr.io/converged-computing/oras-operator:${tag}-arm
build:
runs-on: ubuntu-latest
strategy:
matrix:
command: [docker]
name: make and build ${{ matrix.command }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: ^1.20
- name: Set tag
run: |
echo "Tag for release is ${{ inputs.release_tag }}"
echo "tag=${{ inputs.release_tag }}" >> ${GITHUB_ENV}
- name: GHCR Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Container
env:
tag: ${{ env.tag }}
run: |
image=ghcr.io/converged-computing/oras-operator-${{ matrix.command }}:v${tag}
img=ghcr.io/converged-computing/oras-operator:v${tag}
make ${{ matrix.command }}-build BUNDLE_IMG=${image} IMG=${img} CATALOG_IMG=${image}
- name: Deploy Container
env:
tag: ${{ env.tag }}
run: |
image=ghcr.io/converged-computing/oras-operator-${{ matrix.command }}:v${tag}
img=ghcr.io/converged-computing/oras-operator:v${tag}
make ${{ matrix.command }}-push BUNDLE_IMG=${image} IMG=${img} CATALOG_IMG=${image}
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: ^1.19
- name: Set tag
run: |
echo "Tag for release is ${{ inputs.release_tag }}"
echo "tag=${{ inputs.release_tag }}" >> ${GITHUB_ENV}
- name: Build release manifests
env:
tag: ${{ env.tag }}
run: |
make build-config-arm ARMIMG=ghcr.io/converged-computing/oras-operator:${tag}-arm
make build-config IMG=ghcr.io/converged-computing/oras-operator:v${tag}
- name: Release oras Operator
uses: softprops/action-gh-release@v1
with:
name: ORAS Operator Release v${{ env.tag }}
tag_name: ${{ env.tag }}
generate_release_notes: true
files: |
examples/dist/oras-operator-arm.yaml
examples/dist/oras-operator.yaml
env:
GITHUB_REPOSITORY: converged-computing/oras-operator