Skip to content

Merge pull request #19 from simple-retro/ci/deploy-actions #1

Merge pull request #19 from simple-retro/ci/deploy-actions

Merge pull request #19 from simple-retro/ci/deploy-actions #1

Workflow file for this run

name: Publish version
on:
push:
tags:
- "*"
jobs:
publish-docker-image:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
env:
IMAGE_NAME: ghcr.io/simple-retro/backend
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build docker image
run: docker build . --file Dockerfile --tag ${IMAGE_NAME}:latest --tag ${IMAGE_NAME}:${{ github.ref_name }}
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Publish docker image
run: docker push --all-tags ${IMAGE_NAME}