Skip to content

Commit bc26f7a

Browse files
committed
chore: update github workflow to push to more registry
1 parent 7998a58 commit bc26f7a

File tree

3 files changed

+36
-29
lines changed

3 files changed

+36
-29
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
tags:
55
- v*
66

7+
env:
8+
IMAGE_NAME: shadow-tls
9+
710
jobs:
811
build:
912
runs-on: ubuntu-latest
@@ -14,15 +17,34 @@ jobs:
1417
uses: docker/setup-qemu-action@v2
1518
- name: Setup Docker Buildx
1619
uses: docker/setup-buildx-action@v1
20+
- name: Login to Dockerhub
21+
uses: docker/login-action@v1
22+
with:
23+
username: ${{ secrets.DOCKERHUB_USERNAME }}
24+
password: ${{ secrets.DOCKERHUB_TOKEN }}
1725
- name: Login to GitHub Container Registry
1826
uses: docker/login-action@v1
1927
with:
2028
registry: ghcr.io
2129
username: ${{ github.repository_owner }}
2230
password: ${{ secrets.GITHUB_TOKEN }}
31+
- name: Login to Gitlab Container Registry
32+
uses: docker/login-action@v1
33+
with:
34+
registry: registry.gitlab.com
35+
username: ${{ secrets.GITLAB_USERNAME }}
36+
password: ${{ secrets.GITLAB_TOKEN }}
37+
- name: Generate App Version
38+
run: echo VERSIONED_TAG=`git describe --tags --always` >> $GITHUB_ENV
2339
- name: Build and release Docker images
2440
uses: docker/build-push-action@v2
2541
with:
2642
platforms: linux/amd64,linux/arm64
27-
tags: ghcr.io/${{ github.repository_owner }}/shadow-tls:latest
43+
tags: |
44+
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
45+
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSIONED_TAG }}
46+
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
47+
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSIONED_TAG }}
48+
registry.gitlab.com/${{ secrets.GITLAB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
49+
registry.gitlab.com/${{ secrets.GITLAB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSIONED_TAG }}
2850
push: true

Cargo.lock

Lines changed: 12 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "MIT/Apache-2.0"
77
name = "shadow-tls"
88
readme = "README.md"
99
repository = "https://github.com/ihciah/shadow-tls"
10-
version = "0.2.16"
10+
version = "0.2.17"
1111

1212
[dependencies]
1313
monoio = {version = "0.0.9"}

0 commit comments

Comments
 (0)