Skip to content

Egeria dockerfile updated #6

Egeria dockerfile updated

Egeria dockerfile updated #6

Workflow file for this run

name: Egeria CI/CD
on:
push:
branches:
- "main"
paths:
- "egeria/*"
jobs:
create-artifact-egeria:
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./egeria
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.23
- uses: actions/setup-node@v4
with:
node-version: 20
- name: build
run: make cross-compiled
- name: compress
run: |
set -x
find ./build -maxdepth 1 -mindepth 1 -type d -exec sh -c 'tar -zcf build/egeria-$(basename {}).tgz -C {} egeria -C $(pwd)/packaging/systemd egeria.service' \;
- uses: actions/upload-artifact@v4
with:
name: egeria-binaries
path: |
egeria/build/egeria-amd64.tgz
egeria/build/egeria-arm64.tgz
release-rolling:
needs: [create-artifact-egeria]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v4
with:
name: egeria-binaries
- uses: "marvinpinto/[email protected]"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "egeria-rolling"
prerelease: true
title: "Cutting Edge Egeria"
files: |
egeria-amd64.tgz
egeria-arm64.tgz
build-and-push-rolling-egeria-container:
name: Build and push container images for egeria
needs: [create-artifact-egeria]
runs-on: ubuntu-20.04
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_REPOSITORY: ghcr.io/${{ github.repository_owner }}/egeria
IMAGE_TAG: "rolling"
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96
with:
images: ${{ env.IMAGE_REPOSITORY }}
- name: Build and push container image
uses: docker/build-push-action@v4
with:
context: ./egeria
file: "egeria/Dockerfile"
push: true
tags: ${{ env.IMAGE_REPOSITORY }}:${{ env.IMAGE_TAG }}
labels: ${{ steps.meta.outputs.labels }}
platforms: "linux/amd64,linux/arm64"
cache-from: type=gha
cache-to: type=gha,mode=max