Skip to content

v3.25.21

v3.25.21 #205

Workflow file for this run

name: Publish Docker
on:
release:
types:
- published
concurrency: release
env:
REGISTRY: ghcr.io
jobs:
publish-docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- name: Insights Explorer
image: expediagroup/insights-explorer
dockerfile: ./Dockerfile
- name: Convertbot
image: expediagroup/insights-explorer-convertbot
dockerfile: ./packages/convertbot/Dockerfile
- name: Slackbot
image: expediagroup/insights-explorer-slackbot
dockerfile: ./packages/slackbot/Dockerfile
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Parse release version
run: |
VERSION=${GITHUB_REF_NAME#v*}
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "MAJOR=$(echo $VERSION | cut -d. -f1)" >> $GITHUB_ENV
echo "MINOR=$(echo $VERSION | cut -d. -f2)" >> $GITHUB_ENV
echo "PATCH=$(echo $VERSION | cut -d. -f3)" >> $GITHUB_ENV
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta - ${{ matrix.name }}
uses: docker/metadata-action@v5
id: meta
with:
images: |
${{ env.REGISTRY }}/${{ matrix.image }}
flavor: |
latest=true
tags: |
type=raw,value=${{ env.VERSION }}
type=raw,value=${{ env.MAJOR }}.${{ env.MINOR }}
type=raw,value=${{ env.MAJOR }},enable=${{ ! env.MAJOR == 0 }}
- name: Docker build - ${{ matrix.name }}
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max