Skip to content

Commit

Permalink
Fix publishing Docker image to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
markuspoerschke committed Apr 10, 2021
1 parent 7fbbbd8 commit 8e40a03
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: pull_request

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
# Check out, and set up the node/ruby infra
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release Danger-JS package

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Export tag version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Docker Login
run: echo $PACKAGES_WRITE_TOKEN | docker login ghcr.io -u $USERNAME --password-stdin
env:
PACKAGES_WRITE_TOKEN: ${{ secrets.DOCKER_GITHUB_PASSWORD }}
USERNAME: ${{ secrets.DOCKER_GITHUB_USERNAME }}

- name: Docker Build
run: docker build -t ghcr.io/danger/danger-js:$VERSION .

- name: Deploy
run: docker push ghcr.io/danger/danger-js:$VERSION
30 changes: 0 additions & 30 deletions .github/workflows/uploadDockerImage.yml

This file was deleted.

0 comments on commit 8e40a03

Please sign in to comment.