Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release workflows #8

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,26 @@ on:
push:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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

jobs:
build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.20
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: '1.20'
go-version: '1.21'
id: go

- 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: Run checks
run: |
make ci
make ci
4 changes: 2 additions & 2 deletions .github/workflows/release-tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v1
Expand All @@ -38,4 +38,4 @@ jobs:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
run: |
./hack/scripts/update-release-tracker.sh
./hack/scripts/update-release-tracker.sh
42 changes: 29 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ 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-20.04
runs-on: ubuntu-22.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Install GitHub CLI
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
sudo mv bin/hub /usr/local/bin

- name: Print version info
id: semver
run: |
Expand All @@ -30,15 +30,31 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Publish to GitHub Container Registry
- name: Build
env:
REGISTRY: ghcr.io/kubestash
DOCKER_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
USERNAME: 1gtm
APPSCODE_ENV: prod
run: |
docker login ghcr.io --username ${USERNAME} --password ${DOCKER_TOKEN}
make release
make release COMPRESS=yes

- name: Release
uses: softprops/action-gh-release@v1
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: Install GitHub CLI
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
sudo mv bin/hub /usr/local/bin

- name: Clone krew-index repository
env:
Expand All @@ -60,4 +76,4 @@ jobs:
if: startsWith(github.event.ref, 'refs/tags/') && (contains(github.ref, '-alpha.') || contains(github.ref, '-beta.') || contains(github.ref, '-rc.')) == false
run: |
cd $RUNNER_WORKSPACE/krew-index
./hack/scripts/open-pr.sh $GITHUB_WORKSPACE kubestash
./hack/scripts/open-pr.sh $GITHUB_WORKSPACE kubestash
8 changes: 4 additions & 4 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ concurrency:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.20
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: '1.20'
go-version: '1.21'
id: go

- uses: actions/checkout@v1
Expand Down Expand Up @@ -49,4 +49,4 @@ jobs:
run: |
export DOCS_ROOT=$RUNNER_WORKSPACE/$(basename $DOCS_REPOSITORY)
./hack/gendocs/make.sh
$DOCS_ROOT/hack/scripts/open-pr.sh
$DOCS_ROOT/hack/scripts/open-pr.sh
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ BIN_PLATFORMS := $(DOCKER_PLATFORMS) windows/amd64 darwin/amd64 darwin/arm64
OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))

GO_VERSION ?= 1.20
GO_VERSION ?= 1.21
BUILD_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION)

RESTIC_VER := 0.16.0
Expand Down
Loading