Skip to content

Commit

Permalink
Publish helm charts as OCI artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Jan 2, 2023
1 parent 1d9e2b5 commit 7451bba
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-ci
cancel-in-progress: true

jobs:
build:
name: Build
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/publish-oci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: OCI

on:
push:
tags:
- "*.*"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-oci
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Publish to GitHub Container Registry
env:
REGISTRY: ghcr.io/bytebuilders
DOCKER_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
USERNAME: 1gtm
APPSCODE_ENV: prod
run: |
docker login ghcr.io --username ${USERNAME} --password ${DOCKER_TOKEN}
- name: Publish to Docker Registry
env:
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
USERNAME: 1gtm
APPSCODE_ENV: prod
run: |
docker login --username ${USERNAME} --password ${DOCKER_TOKEN}
- name: Install Helm 3
run: |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- name: Clone charts repository
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
CHART_REPOSITORY: github.com/appscode/charts
run: |
url="https://${GITHUB_USER}:${GITHUB_TOKEN}@${CHART_REPOSITORY}.git"
cd $RUNNER_WORKSPACE
git clone $url
cd $(basename $CHART_REPOSITORY)
git config user.name "${GITHUB_USER}"
git config user.email "${GITHUB_USER}@appscode.com"
git checkout pub-oci
- name: Publish OCI charts
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
CHART_REPOSITORY: github.com/appscode/charts
run: |
export REGISTRY_0=oci://index.docker.io/bytebuilders
export REGISTRY_1=oci://ghcr.io/bytebuilders
$RUNNER_WORKSPACE/$(basename $CHART_REPOSITORY)/hack/scripts/publish-oci-charts.sh $(pwd)
4 changes: 4 additions & 0 deletions .github/workflows/release-tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
types: [closed]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-20.04
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- "*.*"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-release
cancel-in-progress: true

jobs:
build:
name: Build
Expand Down

0 comments on commit 7451bba

Please sign in to comment.