Skip to content

Commit

Permalink
Formal release process
Browse files Browse the repository at this point in the history
  • Loading branch information
uhthomas committed Feb 18, 2021
1 parent 4a05e5c commit 5f0d600
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 28 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/push.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release
on:
release:
types: [published]
jobs:
push:
name: Push release tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install bazelisk
run: curl -L "https://github.com/bazelbuild/bazelisk/releases/download/v1.7.4/bazelisk-linux-amd64" | install -D /dev/stdin "${GITHUB_WORKSPACE}/bin/bazel"
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- run: bazel run //cmd/kipp:push
env:
GIT_COMMIT: ${{ github.sha }}
GIT_REF: ${{ github.event.release.tag_name }}
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Test
on: [push]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install bazelisk
run: curl -L "https://github.com/bazelbuild/bazelisk/releases/download/v1.7.4/bazelisk-linux-amd64" | install -D /dev/stdin "${GITHUB_WORKSPACE}/bin/bazel"
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- run: bazel test //...
8 changes: 4 additions & 4 deletions cmd/kipp/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ go_image(
load("@io_bazel_rules_docker//docker:docker.bzl", "docker_bundle")

docker_bundle(
name = "kipp_bundle",
name = "bundle",
images = {
"index.docker.io/uhthomas/kipp:latest": ":kipp",
"index.docker.io/uhthomas/kipp:{STABLE_GIT_COMMIT}": ":kipp",
"index.docker.io/uhthomas/kipp:{STABLE_GIT_REF}": ":kipp",
"ghcr.io/uhthomas/kipp:latest": ":kipp",
"ghcr.io/uhthomas/kipp:{STABLE_GIT_COMMIT}": ":kipp",
"ghcr.io/uhthomas/kipp:{STABLE_GIT_REF}": ":kipp",
},
)

load("@io_bazel_rules_docker//contrib:push-all.bzl", "docker_push")

docker_push(
name = "push",
bundle = "kipp_bundle",
bundle = "bundle",
# Pushing layers concurrently sometimes fails.
# See GitHub support ticket 885486.
sequential = True,
Expand Down

0 comments on commit 5f0d600

Please sign in to comment.