release(0.18.5) bump used cargo-generate version to v0.18.5 (#17) #24
Workflow file for this run
This file contains 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: Publish Docker image | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]-alpha.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]-beta.[0-9]+' | |
paths-ignore: | |
- "**/docs/**" | |
- "**.md" | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
env: | |
DOCKERHUB_USER: cargogenerate | |
DOCKERHUB_IMAGE: cargo-generate-action | |
steps: | |
# Check out code | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ${{env.DOCKERHUB_USER}}/${{env.DOCKERHUB_IMAGE}} | |
tags: type=semver,pattern={{version}} | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ env.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# And make it available for the builds | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
labels: | | |
rust | |
cargo | |
cargo-generate | |
tags: ${{ steps.meta.outputs.tags }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: Latest Release | |
prerelease: false | |
draft: false |