bebot/.gitea/workflows/release.yaml
Brian J. Tarricone f8cc11dc34
All checks were successful
CI / CI (push) Successful in 10m23s
Attempt to fix release pipeline by installing docker
2023-09-20 20:55:40 -07:00

50 lines
1.5 KiB
YAML

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
release-crate:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- uses: https://gitea.com/actions/checkout@v3
- uses: https://github.com/actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Publish release
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
release-docker:
name: Publish to Docker Hub
runs-on: ubuntu-latest
steps:
- name: install docker
run: |
apt update
DEBIAN_FRONTEND=noninteractive apt install -y docker.io
apt clean
- uses: https://gitea.com/actions/checkout@v3
- name: docker meta
id: meta
uses: https://github.com/docker/metadata-action@v4
with:
images: |
kelnos/bebot
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- uses: https://gitea.com/docker/setup-qemu-action@v2
- uses: https://gitea.com/docker/setup-buildx-action@v2
- uses: https://gitea.com/docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- uses: https://gitea.com/docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.output.labels }}