Skip to content

Commit

Permalink
chore: update github workflow to push to more registry
Browse files Browse the repository at this point in the history
  • Loading branch information
ihciah committed Feb 17, 2023
1 parent 7998a58 commit bc26f7a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 29 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
tags:
- v*

env:
IMAGE_NAME: shadow-tls

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -14,15 +17,34 @@ jobs:
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Gitlab Container Registry
uses: docker/login-action@v1
with:
registry: registry.gitlab.com
username: ${{ secrets.GITLAB_USERNAME }}
password: ${{ secrets.GITLAB_TOKEN }}
- name: Generate App Version
run: echo VERSIONED_TAG=`git describe --tags --always` >> $GITHUB_ENV
- name: Build and release Docker images
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
tags: ghcr.io/${{ github.repository_owner }}/shadow-tls:latest
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSIONED_TAG }}
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSIONED_TAG }}
registry.gitlab.com/${{ secrets.GITLAB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
registry.gitlab.com/${{ secrets.GITLAB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSIONED_TAG }}
push: true
39 changes: 12 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT/Apache-2.0"
name = "shadow-tls"
readme = "README.md"
repository = "https://github.com/ihciah/shadow-tls"
version = "0.2.16"
version = "0.2.17"

[dependencies]
monoio = {version = "0.0.9"}
Expand Down

0 comments on commit bc26f7a

Please sign in to comment.