forked from helmfile/helmfile
-
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.
Publish canary container images via ghcr.io
- Loading branch information
Showing
4 changed files
with
94 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "Setup Docker" | ||
|
||
outputs: | ||
sha_short: | ||
description: "The short SHA used for image builds" | ||
value: ${{ steps.vars.outputs.sha_short }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Get Short SHA | ||
id: vars | ||
run: | | ||
echo ::set-output name=sha_short::${GITHUB_SHA::7} | ||
shell: bash | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
version: latest | ||
|
||
# - name: Login to DockerHub | ||
# if: ${{ github.ref == 'main' && github.event.pull_request.merged == true }} | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# username: ${{ inputs.username }} | ||
# password: ${{ inputs.password }} |
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,60 @@ | ||
name: Publish Canary Images | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- .github/workflows/ci.yml | ||
- .github/workflows/lock.yml | ||
- "docs/**" | ||
- "hack/**" | ||
- "**.md" | ||
- ".gitignore" | ||
- "Makefile" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
name: Build and Publish Canary Images | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USER }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Docker Environment | ||
id: vars | ||
uses: ./.github/actions/setup-docker-environment | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and Push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
file: Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: | | ||
ghcr.io/${{ github.repository }}:canary | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Build and Push (debian stable-slim) | ||
uses: docker/build-push-action@v2 | ||
with: | ||
file: Dockerfile.debian | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: | | ||
ghcr.io/${{ github.repository }}-debian-stable-slim:canary | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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