Skip to content

Commit

Permalink
ci: public docker image on repo tag
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumedsde committed Nov 17, 2024
1 parent 2f2dcc0 commit 1e1ad56
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,37 @@ jobs:
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: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# 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 }}


0 comments on commit 1e1ad56

Please sign in to comment.