release #51
This file contains hidden or 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: release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| dockerfile: | |
| description: Dockerfile to build image from | |
| type: choice | |
| options: | |
| - images/nodesvc-base/Dockerfile | |
| - Dockerfile | |
| required: true | |
| tag: | |
| type: string | |
| description: 'Tag to be released' | |
| required: true | |
| create-github-release: | |
| type: boolean | |
| description: Create a tag and matching Github release. | |
| required: false | |
| default: false | |
| jobs: | |
| build: | |
| uses: scality/workflows/.github/workflows/docker-build.yaml@v2 | |
| with: | |
| namespace: ${{ github.repository_owner }} | |
| name: ${{ github.event.repository.name }} | |
| context: . | |
| file: ${{ github.event.inputs.dockerfile}} | |
| tag: ${{ github.event.inputs.tag }} | |
| release: | |
| if: ${{ inputs.create-github-release }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| name: Release ${{ github.event.inputs.tag }} | |
| tag_name: ${{ github.event.inputs.tag }} | |
| generate_release_notes: true | |
| target_commitish: ${{ github.sha }} |