fix(ci): template CRDs apart of the chart package process #13
Workflow file for this run
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
--- | |
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: "Container: Image Build" | |
on: | |
workflow_dispatch: {} | |
pull_request: | |
branches: ["coreweave"] | |
types: ["opened", "synchronize", "reopened"] | |
paths: | |
- .github/workflows/publish-image.yaml | |
- "**/*" | |
push: | |
branches: | |
- coreweave | |
paths: | |
- .github/workflows/publish-image.yaml | |
- "**/*" | |
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: Set VERSION from VERSION.txt | |
id: set_version | |
run: echo "VERSION=$(cat VERSION.txt)" >> $GITHUB_ENV | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{ github.repository }} | |
labels: | | |
org.opencontainers.image.source="https://github.com/coreweave/tailscale" | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=schedule | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=raw,value=${{ env.VERSION }} | |
type=raw,value=${{ env.VERSION }}-{{sha}} | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Log into registry ghcr.io | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
id: build-and-push | |
uses: docker/[email protected] | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
context: ./ | |
file: ./Dockerfile | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
VERSION=${{ env.VERSION }} | |
tags: ${{ steps.meta.outputs.tags }} |