forked from traefik/traefik
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add image build CI Signed-off-by: Anthony Rabbito <arabbito@coreweave.com> * chore: drop all upstream CI Signed-off-by: Anthony Rabbito <arabbito@coreweave.com> * fix: logging into registry twice Signed-off-by: Anthony Rabbito <arabbito@coreweave.com> --------- Signed-off-by: Anthony Rabbito <arabbito@coreweave.com>
- Loading branch information
Showing
9 changed files
with
55 additions
and
522 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,55 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: "Container: Image Build" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to tag the container with | ||
required: true | ||
type: string | ||
publish: | ||
description: Publish the container to the registry | ||
required: true | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
publish-images: | ||
name: Publish Image | ||
permissions: | ||
contents: write | ||
packages: write | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Log into registry ghcr.io | ||
uses: docker/login-action@v3.3.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3.2.0 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3.6.1 | ||
|
||
- name: Build and publish image | ||
env: | ||
DOCKER_BUILDX_ARGS: "--load --cache-from type=gha --cache-to type=gha,mode=max" | ||
run: | | ||
make build-webui-image | ||
make build-image-dirty | ||
- name: Push image | ||
if: ${{inputs.publish}} | ||
run: | | ||
docker tag traefik/traefik ghcr.io/${{ github.repository }}:${{ inputs.version }}-${GITHUB_SHA::7} | ||
docker push ghcr.io/${{ github.repository }}:${{ inputs.version }}-${GITHUB_SHA::7} |
Oops, something went wrong.