message: release: fix workflow
diff: @@ -3,6 +3,12 @@ on:
  branches:
  - main
  + pull_request:
  + branches:
  + - main
  + paths:
  + - '.github/workflows/release.yml'
  +
  release:
  types: [published]
  @@ -30,9 +36,9 @@ jobs:
  TAGS="${DOCKER_IMAGE}:${VERSION}"
  # mark the latest on release
  if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
  - TAGS="$TAGS,${DOCKER_IMAGE}:latest"
  + TAGS="$TAGS\n${DOCKER_IMAGE}:latest"
  fi
  - echo ::set-output name=tags::${TAGS}
  + echo "::set-output name=tags::${TAGS}"
  - name: Login to GitHub Packages
  uses: docker/login-action@v1
  @@ -44,6 +50,6 @@ jobs:
  - name: Build and push image
  uses: docker/build-push-action@v2
  with:
  - tags: ${{ steps.prep.outputs.tags }}
  + tags: ${{ steps.tags.outputs.tags }}
  file: qns/Dockerfile.build
  - push: true
  + push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
  