Merge pull request #19 from simple-retro/ci/fix-env #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/frontend | |
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} |