Skip to content

v0.4.4

v0.4.4 #3

Workflow file for this run

name: Build and Package
on:
push:
tags: '*'
release:
types:
- published
env:
REGISTRY: ghcr.io
IMAGE_NAME: graph-manage-engine-ec
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Cosign
uses: sigstore/cosign-installer@v3
- name: Lowercase the repo name
run: echo "REPO=graph-manage-engine-ec" >>${GITHUB_ENV}
# Login against a Docker registry
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# tags: type=sha,format=long
# Build and push Docker image
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Sign the Docker image (Using OIDC Token for "keyless signing")
# https://github.com/sigstore/cosign-installer
- name: Sign the images with GH OIDC Token
env:
REPO: ${{ env.REPO }}
run:
COSIGN_REPOSITORY=ghcr.io/${{ env.REPO }}-signatures cosign sign -y
ghcr.io/${{ env.REPO }}@${{ steps.build-and-push.outputs.DIGEST }}