Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
github: enable docker feature
Browse files Browse the repository at this point in the history
Change-Id: I3251dbd83f3724b28b5732f4bc825288eba6afcf
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/5141
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
  • Loading branch information
zchee authored and mpvl committed Apr 9, 2020
1 parent 882d88d commit d9ca690
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Release

on:
push:
tags:
- 'v*'
release:
types: [published]

jobs:
goreleaser:
Expand All @@ -21,3 +20,34 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}

docker:
name: docker
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Set version environment
run: |
CUE_VERSION=$(echo ${GITHUB_REF##refs/tags/v})
echo "CUE_VERSION=$CUE_VERSION"
echo "::set-env name=CUE_VERSION::$(echo $CUE_VERSION)"
- name: Push to Docker Hub
uses: docker/build-push-action@v1
env:
DOCKER_BUILDKIT: 1
GOLANG_VERSION: 1.14
CUE_VERSION: ${{ env.CUE_VERSION }}
with:
repository: cuelang/cue
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: ${{ env.CUE_VERSION }},latest
tag_with_ref: false
tag_with_sha: false
target: cue
always_pull: true
build_args: GOLANG_VERSION=${{ env.GOLANG_VERSION }},CUE_VERSION=${{ env.CUE_VERSION }}
add_git_labels: true

0 comments on commit d9ca690

Please sign in to comment.