Skip to content

Update docker-image.yml #132

Update docker-image.yml

Update docker-image.yml #132

Workflow file for this run

name: Docker Image CI

Check failure on line 1 in .github/workflows/docker-image.yml

View workflow run for this annotation

GitHub Actions / Docker Image CI

Invalid workflow file

The workflow is not valid. .github/workflows/docker-image.yml: (Line: 15, Col: 11, Idx: 358) - (Line: 15, Col: 12, Idx: 359): While parsing a tag, did not find expected tag URI.
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
if: startsWith(github.ref, 'refs/tags/')
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKER_IMAGE_NAME }}:latest
- name: Build the Docker image with a temporary name
if: ! startsWith(github.ref, 'refs/tags/')
run: docker build . --file Dockerfile --tag tmp:notag
- name: Docker Login
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Tag latest docker image
if: startsWith(github.ref, 'refs/tags/')
run: docker tag ${{ secrets.DOCKER_IMAGE_NAME }}:latest wseresearch/${{ secrets.DOCKER_IMAGE_NAME }}:latest
- name: Tag docker image version
if: startsWith(github.ref, 'refs/tags/')
run: docker tag ${{ secrets.DOCKER_IMAGE_NAME }}:latest "wseresearch/${{ secrets.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}"
- name: Push latest docker image
if: startsWith(github.ref, 'refs/tags/')
run: docker push wseresearch/${{ secrets.DOCKER_IMAGE_NAME }}:latest
- name: Replace docker volume mapping if existing
if: startsWith(github.ref, 'refs/tags/')
run: sed -i 's/VOLUME_SETTING/${{ secrets.VOLUMES }}/g' service_config/service_config.json
- name: Push docker image version
if: startsWith(github.ref, 'refs/tags/')
run: docker push "wseresearch/${{ secrets.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}"
- name: Init update
if: startsWith(github.ref, 'refs/tags/')
uses: WSE-research/docker-service-updater@v0.2.1
with:
updater_host: ${{ secrets.UPDATER_HOST }}
api_key: ${{ secrets.API_KEY }}