forked from argoproj/argo-rollouts
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jesse Suen <[email protected]>
- Loading branch information
Showing
11 changed files
with
276 additions
and
124 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.idea/ | ||
.DS_Store | ||
dist/ | ||
ui/dist/ | ||
*.iml | ||
# delve debug binaries | ||
cmd/**/debug | ||
|
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,131 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: Git tag to build release from | ||
required: true | ||
|
||
jobs: | ||
release-images: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.tag }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Print Disk Usage | ||
run: | | ||
df -ah | ||
docker buildx du | ||
- name: Login to GitHub Container Registry | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Login to Quay.io | ||
# if: github.event_name != 'pull_request' | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# registry: quay.io | ||
# username: ${{ secrets.QUAY_USERNAME }} | ||
# password: ${{ secrets.QUAY_ROBOT_TOKEN }} | ||
|
||
- name: Docker meta (controller) | ||
id: controller-meta | ||
uses: crazy-max/ghaction-docker-meta@v2 | ||
with: | ||
images: | | ||
quay.io/argoproj/argo-rollouts | ||
ghcr.io/argoproj/argo-rollouts | ||
tags: | | ||
type=semver,pattern={{version}} | ||
- name: Docker meta (plugin) | ||
id: plugin-meta | ||
uses: crazy-max/ghaction-docker-meta@v2 | ||
with: | ||
images: | | ||
quay.io/argoproj/kubectl-argo-rollouts | ||
ghcr.io/argoproj/kubectl-argo-rollouts | ||
tags: | | ||
type=semver,pattern={{version}} | ||
- name: Build and push (controller-image) | ||
uses: docker/build-push-action@v2 | ||
with: | ||
#platforms: linux/amd64,linux/arm64 | ||
platforms: linux/amd64 | ||
#push: true | ||
push: false | ||
tags: ${{ steps.controller-meta.outputs.tags }} | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
|
||
- name: Build and push (plugin-image) | ||
uses: docker/build-push-action@v2 | ||
with: | ||
target: kubectl-argo-rollouts | ||
#platforms: linux/amd64,linux/arm64 | ||
platforms: linux/amd64 | ||
#push: true | ||
push: false | ||
tags: ${{ steps.plugin-meta.outputs.tags }} | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache-new | ||
|
||
# Temp fix | ||
# https://github.com/docker/build-push-action/issues/252 | ||
# https://github.com/moby/buildkit/issues/1896 | ||
- name: Move cache | ||
run: | | ||
rm -rf /tmp/.buildx-cache | ||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | ||
release-artifacts: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.tag }} | ||
|
||
- name: Generate release artifacts | ||
run: | | ||
make release-plugins | ||
make manifests IMAGE_TAG=${{ github.event.inputs.tag }} | ||
- name: Draft release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ github.event.inputs.tag }} | ||
draft: true | ||
files: | | ||
dist/kubectl-argo-rollouts-linux-amd64 | ||
dist/kubectl-argo-rollouts-darwin-amd64 | ||
manifests/install.yaml | ||
manifests/namespace-install.yaml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.