Skip to content

feat(docker): rework docker on the spot (#16) #18

feat(docker): rework docker on the spot (#16)

feat(docker): rework docker on the spot (#16) #18

Workflow file for this run

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