Skip to content

Publish Docker image on release #5

Publish Docker image on release

Publish Docker image on release #5

Workflow file for this run

# Copyright © 2022 The OSRD Contributors
#
# SPDX-License-Identifier: LGPL-3.0-only
name: Publish Docker image on release
on:
release:
types: [published]
jobs:
build-and-push-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: '$'
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker build . -t ghcr.io/openrailassociation/osrd-stable/osrd-images:${{ github.event.release.tag_name }}
- name: Push Docker image
run: |
docker push ghcr.io/openrailassociation/osrd-stable/osrd-images:${{ github.event.release.tag_name }}