Skip to content

Fix Dockerfiles + CI job for building and uploading docker images (#22) #21

Fix Dockerfiles + CI job for building and uploading docker images (#22)

Fix Dockerfiles + CI job for building and uploading docker images (#22) #21

Workflow file for this run

name: Release
on:
push:
tags: [ v* ]
env:
CARGO_TERM_COLOR: always
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: diode-send,diode-receive,diode-send-file,diode-receive-file
archive: lidi-$tag
token: ${{ secrets.GITHUB_TOKEN }}
build-and-push-docker-image:
name: Builds and pushes a tagged docker image
runs-on: ubuntu-latest
strategy:
matrix:
lidi_service:
- send
- receive
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: docker_meta
with:
images: docker.io/anssi/lidi-${{ matrix.lidi_service }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- uses: docker/build-push-action@v5
with:
context: .
push: true
target: ${{ matrix.lidi_service }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}