weathermen/soundstorm

View on GitHub
.github/workflows/publish.yml

Summary

Maintainability
Test Coverage
name: Release
on:
  push:
    tags: [v*]
jobs:
  publish:
    name: Publish New Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Source Code
        uses: actions/checkout@v1
      - name: Build and Publish Image
        uses: elgohr/Publish-Docker-Github-Action@master
        env:
          RAILS_ENV: production
          RAILS_MASTER_KEY: ${{ secrets.master_key }}
        with:
          name: weathermen/soundstorm
          username: ${{ secrets.docker_login }}
          password: ${{ secrets.docker_password }}
          tag_names: true
          build_args: 'RAILS_ENV,RAILS_MASTER_KEY'
      - name: Find Current Version
        id: get_version
        run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
      - name: Create GitHub Release
        id: create_release
        uses: actions/create-release@v1.0.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ steps.get_version.outputs.VERSION }}
          release_name: Release ${{ steps.get_version.outputs.VERSION }}
          draft: true