mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
[gha] build and publish release containers
This commit is contained in:
parent
a97d2bbb63
commit
669720d8f5
23
.github/workflows/docker.yml
vendored
23
.github/workflows/docker.yml
vendored
|
@ -1,6 +1,6 @@
|
||||||
name: Build containers
|
name: Build containers
|
||||||
|
|
||||||
on: push
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
|
@ -32,7 +32,8 @@ jobs:
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push trunk container
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: ./contrib/docker
|
context: ./contrib/docker
|
||||||
|
@ -42,3 +43,21 @@ jobs:
|
||||||
tags: |
|
tags: |
|
||||||
purplei2p/i2pd:latest
|
purplei2p/i2pd:latest
|
||||||
ghcr.io/purplei2p/i2pd:latest
|
ghcr.io/purplei2p/i2pd:latest
|
||||||
|
|
||||||
|
- name: Set env
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Build and push release container
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: ./contrib/docker
|
||||||
|
file: ./contrib/docker/Dockerfile
|
||||||
|
platforms: linux/amd64,linux/386
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
purplei2p/i2pd:latest
|
||||||
|
purplei2p/i2pd:release-${{ env.RELEASE_VERSION }}
|
||||||
|
ghcr.io/purplei2p/i2pd:latest
|
||||||
|
ghcr.io/purplei2p/i2pd:release-${{ env.RELEASE_VERSION }}
|
||||||
|
|
Loading…
Reference in a new issue