title: How to use Release event to build and tag a docker image via GitHub CI?
body: <p>I want to use GitHub release to tigger a Github CI and add the release version tag and latest tag to my image.
  Here is my workflow code, but it didn't work.</p>
  <pre class="lang-yaml prettyprint-override"><code>name: ci
  
  on:
    release:
      types:
        - published
  
  jobs:
    docker:
      runs-on: ubuntu-latest
      steps:
        -
          name: Checkout
          uses: actions/checkout@v3
        -
          name: Docker meta
          id: meta
          uses: docker/metadata-action@v4
          with:
            images: |
              ${{ secrets.DOCKER_HUB_USERNAME }}/img
            tags: |
              type=ref,event=release
  ......
          name: Build and push
          uses: docker/build-push-action@v3
          with:
            context: .
            platforms: linux/amd64,linux/arm64
            push: true
            tags: ${{ steps.meta.outputs.tags }}
            labels: ${{ steps.meta.outputs.labels }}```
  </code></pre>