Skip to content

v0.13.1

v0.13.1 #17

Workflow file for this run

name: Release images
on:
release:
types:
- released
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_BASE: ${{ github.repository }}
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- id: createImageTag
name: Create image tag
run: |
IMAGE_TAG=$(echo ${{ github.event.release.tag_name }} | sed 's/v//')
echo "::set-output name=imageTag::$IMAGE_TAG"
outputs:
imageTag: ${{ steps.createImageTag.outputs.imageTag }}
build:
name: Build and release images
needs: setup
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
image: ["aqua-scan", "finish", "go-toolset", "gradle-toolset", "helm", "node16-npm-toolset", "node18-npm-toolset", "package-image", "pipeline-manager", "python-toolset", "sonar", "start"]
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
# 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 }}
# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
- name: Build and release Docker image
id: build-and-push
uses: docker/build-push-action@v3
with:
context: .
file: build/package/Dockerfile.${{ matrix.image }}
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE }}/ods-${{ matrix.image }}:${{ needs.setup.outputs.imageTag }}