Skip to content

Commit

Permalink
Update the release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Schlicht committed Jul 7, 2020
1 parent 3e296cd commit fd3a745
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Release Workflow
on:
push:
tags:
- 'v*.*.*'
release:
types: [published]

jobs:
build:
Expand All @@ -12,18 +11,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Login to Github Package Registry
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_GITHUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_GITHUB_KEY }}
DOCKER_REGISTRY_URL: "docker.pkg.github.com"
run: docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} ${DOCKER_REGISTRY_URL}

- name: Set version env
run: echo "::set-env name=GIT_TAG::${GITHUB_REF#refs/*/}"

- name: Build Docker container
run: docker build -f build/Dockerfile -t docker.pkg.github.com/kudobuilder/kitt/kitt:$GIT_TAG .

- name: Push Docker container
run: docker push docker.pkg.github.com/kudobuilder/kitt/kitt:$GIT_TAG
- name: Push to Github Packages
uses: docker/build-push-action@v1
with:
dockerfile: build/Dockerfile
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: kudobuilder/kitt/kitt
tag_with_ref: true

0 comments on commit fd3a745

Please sign in to comment.