-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from DefGuard/dev
merge dev -> main
- Loading branch information
Showing
22 changed files
with
5,255 additions
and
3,943 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
-s dir | ||
--name defguard-proxy | ||
--architecture x86_64 | ||
--description "defguard proxy service" | ||
--url "https://defguard.net/" | ||
--maintainer "teonite" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Build Docker image | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
tags: | ||
description: "List of tags as key-value pair attributes" | ||
required: false | ||
type: string | ||
|
||
env: | ||
GHCR_REPO: ghcr.io/defguard/proxy | ||
|
||
jobs: | ||
build-docker: | ||
runs-on: | ||
- self-hosted | ||
- Linux | ||
- ${{ matrix.runner }} | ||
strategy: | ||
matrix: | ||
cpu: [arm64, amd64] | ||
include: | ||
- cpu: arm64 | ||
runner: ARM64 | ||
- cpu: amd64 | ||
runner: X64 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Login to GitHub container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
buildkitd-config-inline: | | ||
[registry."docker.io"] | ||
mirrors = ["dockerhub-proxy.teonite.net"] | ||
- name: Build container | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/${{ matrix.cpu }} | ||
provenance: false | ||
push: true | ||
tags: ${{ env.GHCR_REPO }}:${{ github.sha }}-${{ matrix.cpu }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
docker-manifest: | ||
runs-on: [self-hosted, Linux] | ||
needs: [build-docker] | ||
steps: | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
${{ env.GHCR_REPO }} | ||
tags: ${{ inputs.tags }} | ||
- name: Login to GitHub container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create and push manifests | ||
run: | | ||
tags='${{ env.GHCR_REPO }}:${{ github.sha }} ${{ steps.meta.outputs.tags }}' | ||
for tag in ${tags} | ||
do | ||
docker manifest create --amend ${tag} ${{ env.GHCR_REPO }}:${{ github.sha }}-amd64 ${{ env.GHCR_REPO }}:${{ github.sha }}-arm64 | ||
docker manifest push ${tag} | ||
done |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Build current image | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
paths-ignore: | ||
- "*.md" | ||
- "LICENSE" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-current: | ||
uses: ./.github/workflows/build-docker.yml | ||
with: | ||
tags: | | ||
type=raw,value=current | ||
type=ref,event=branch | ||
type=sha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.