Skip to content

Merge pull request #1602 from finos/bump-typescript-to-6 #154

Merge pull request #1602 from finos/bump-typescript-to-6

Merge pull request #1602 from finos/bump-typescript-to-6 #154

name: Build and Publish Docker Image
on:
push:
branches: [main]
release:
types: [published]
permissions:
contents: read
jobs:
docker-build-publish:
permissions:
contents: read
name: Build and Publish Docker Image
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Log in to Docker Hub
if: github.repository_owner == 'finos'
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
with:
username: finos
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set Docker Image Tag
id: tags
run: |
if [ "${{ github.event_name }}" = "release" ]; then
echo "tags=${{ github.repository }}:${{ github.ref_name }},${{ github.repository }}:latest" >> $GITHUB_OUTPUT
else
echo "tags=${{ github.repository }}:main" >> $GITHUB_OUTPUT
fi
- name: Build and Publish Docker Image
if: github.repository_owner == 'finos'
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.tags.outputs.tags }}
provenance: true