Skip to content

Build and push grist image #8

Build and push grist image

Build and push grist image #8

name: Build and push grist image
on:
workflow_dispatch:
inputs:
gristVersion:
description: 'Grist base image'
required: true
dinumTag:
description: 'DINUM docker image tag'
required: true
commitSha:
description: 'Git commit sha to build the image'
required: true
env:
DOCKER_USER: 1001:127
jobs:
build-and-push-backend:
runs-on: ubuntu-latest
steps:
-
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: "impress,secrets"
-
name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
token: ${{ steps.app-token.outputs.token }}
ref: ${{ github.event.inputs.commitSha }}
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: lasuite/grist
tags: |
type=raw,value=${{ github.event.inputs.dinumTag }}
-
name: Load sops secrets
uses: rouja/actions-sops@main
with:
secret-file: secrets/numerique-gouv/dockerfiles/secrets.enc.env
age-key: ${{ secrets.SOPS_PRIVATE }}
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
run: echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USER" --password-stdin
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ matrix.path }}
file: ${{ matrix.dockerfile }}
push: true
build-args: GRIST_VERSION=${{ github.event.inputs.gristVersion }}
tags: ${{ steps.meta.outputs.tags }}
labels: {{ steps.meta.outputs.labels }}

Check failure on line 65 in .github/workflows/grist-tag-and-push.yaml

View workflow run for this annotation

GitHub Actions / Build and push grist image

Invalid workflow file

The workflow is not valid. .github/workflows/grist-tag-and-push.yaml (Line: 65, Col: 19): A mapping was not expected