Skip to content

Commit

Permalink
ci(github): publish traefik image
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao committed May 12, 2022
1 parent f9d648d commit 42470ed
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,34 @@ jobs:
- name: Print Docker image digest
run: echo ${{ steps.docker_build.outputs.digest }}

push-hm-traefik:
name: Push hm-traefik to GitHub Container Registry
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: ./hm-traefik/Dockerfile
push: true
tags: ghcr.io/hongbo-miao/hm-traefik:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Print Docker image digest
run: echo ${{ steps.docker_build.outputs.digest }}

push-hm-alpine:
name: Push hm-alpine to GitHub Container Registry
runs-on: ubuntu-20.04
Expand Down
2 changes: 2 additions & 0 deletions traefik/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM traefik:v2.6.6
COPY ["traefik/plugins-local/", "/plugins-local/"]
6 changes: 6 additions & 0 deletions traefik/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
traefik:
traefik --configfile=traefik.yaml

docker-build:
cd .. && \
docker build --file=traefik/Dockerfile --tag=ghcr.io/hongbo-miao/hm-traefik:latest .
docker-push:
docker push ghcr.io/hongbo-miao/hm-traefik:latest

0 comments on commit 42470ed

Please sign in to comment.