Skip to content

Add PVC as storage Support for Snapshot Download #49

Add PVC as storage Support for Snapshot Download

Add PVC as storage Support for Snapshot Download #49

Workflow file for this run

name: Release
on:
push:
tags:
- "*.*"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- name: Print version info
id: semver
run: |
make version
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
with:
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Build
env:
APPSCODE_ENV: prod
run: |
make release COMPRESS=yes
- name: Release
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bin/kubectl-kubestash-darwin-amd64.tar.gz
bin/kubectl-kubestash-darwin-arm64.tar.gz
bin/kubectl-kubestash-linux-amd64.tar.gz
bin/kubectl-kubestash-linux-arm.tar.gz
bin/kubectl-kubestash-linux-arm64.tar.gz
bin/kubectl-kubestash-windows-amd64.zip
bin/kubectl-kubestash-checksums.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Classify release
id: release-type
run: |
ref="${GITHUB_REF}"
if [[ "$ref" == refs/tags/* ]] \
&& [[ "$ref" != *-alpha.* ]] \
&& [[ "$ref" != *-beta.* ]] \
&& [[ "$ref" != *-rc.* ]]; then
echo "is_release=true" >> "$GITHUB_OUTPUT"
else
echo "is_release=false" >> "$GITHUB_OUTPUT"
fi
- name: Generate LGTM App token
id: lgtm-app-token
if: steps.release-type.outputs.is_release == 'true'
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ secrets.LGTM_APP_CLIENT_ID }}
private-key: ${{ secrets.LGTM_APP_PRIVATE_KEY }}
owner: appscode
repositories: krew-index
permission-contents: write
permission-pull-requests: write
- name: Clone krew-index repository
if: steps.release-type.outputs.is_release == 'true'
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ steps.lgtm-app-token.outputs.token }}
run: |
KREW_INDEX_REPOSITORY=github.com/appscode/krew-index
url="https://x-access-token:${GITHUB_TOKEN}@${KREW_INDEX_REPOSITORY}.git"
cd $RUNNER_WORKSPACE
git clone $url
cd $(basename $KREW_INDEX_REPOSITORY)
git config user.name "${GITHUB_USER}"
git config user.email "${GITHUB_USER}@appscode.com"
- name: Publish krew manifest
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ steps.lgtm-app-token.outputs.token }}
if: steps.release-type.outputs.is_release == 'true'
run: |
cd $RUNNER_WORKSPACE/krew-index
./hack/scripts/open-pr.sh $GITHUB_WORKSPACE kubestash