-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish helm charts as OCI artifacts
- Loading branch information
Showing
4 changed files
with
83 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
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,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) |
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