Skip to content

v3.59.4

v3.59.4 #313

Workflow file for this run

name: 'Deploy docker images'
on:
release:
types: [published]
workflow_dispatch:
defaults:
run:
shell: bash
env:
tag: ${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
jobs:
build:
name: Build ${{ matrix.name }}
uses: ./.github/workflows/base-build-push-docker.yml
with:
name: ${{ matrix.name }}
context: .
tag: ${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
dockerfile: ${{ matrix.dockerfile }}
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
strategy:
matrix:
name: ['api', 'data']
include:
- name: api
dockerfile: './docker/api/Dockerfile'
- name: data
dockerfile: './docker/data/Dockerfile'
deploy:
name: Deploy
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Trigger Workflow
uses: actions/github-script@v6
env:
TARGET_VERSION: ${{ env.tag }}
with:
github-token: ${{ secrets.GA_PDC_TOKEN }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: 'preuve-covoiturage-infra',
workflow_id: 'deploy.yml',
ref: 'main',
inputs: {
version: process.env.TARGET_VERSION,
},
})