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

Add Master releases via Github Actions #820

Merged
merged 11 commits into from
Sep 13, 2019
Merged
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
49 changes: 49 additions & 0 deletions .github/workflows/release-on-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release Master Snapshot
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure we want ubuntu version changing underneath us?

steps:
- name: Checkout Code
uses: actions/checkout@v1
- name: Get current time
uses: gerred/actions/current-time@master
id: current-time
- name: Login to Github Package Registry
uses: actions/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_GITHUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_GITHUB_KEY }}
DOCKER_REGISTRY_URL: "docker.pkg.github.com"
- name: Build and tag with SHA
uses: actions/docker/cli@master
env:
REPOSITORY: ${{ secrets.REPOSITORY }}
BUILD_DATE: ${{ steps.current-time.outputs.time }}
with:
args: |
build --build-arg git_version_arg=github.com/kudobuilder/kudo/pkg/version.gitVersion=v$GITHUB_SHA \
--build-arg git_commit_arg=github.com/kudobuilder/kudo/pkg/version.gitCommit=$GITHUB_SHA \
--build-arg build_date_arg=github.com/kudobuilder/kudo/pkg/version.buildDate=$BUILD_DATE . -t docker.pkg.github.com/$REPOSITORY:$GITHUB_SHA
- name: Tag with `master`
uses: actions/docker/cli@master
env:
REPOSITORY: ${{ secrets.REPOSITORY }}
with:
args: |
tag docker.pkg.github.com/$REPOSITORY:$GITHUB_SHA docker.pkg.github.com/$REPOSITORY:master
- name: Push image with commit SHA
uses: actions/docker/cli@master
env:
REPOSITORY: ${{ secrets.REPOSITORY }}
with:
args: "push docker.pkg.github.com/$REPOSITORY:$GITHUB_SHA"
- name: Push master tag
uses: actions/docker/cli@master
env:
REPOSITORY: ${{ secrets.REPOSITORY }}
with:
args: "push docker.pkg.github.com/$REPOSITORY:master"