Skip to content

Commit

Permalink
Update uploadDockerImage.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
f-meloni authored Apr 22, 2020
1 parent 77cf01c commit 968d9de
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/uploadDockerImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,28 @@ name: Upload tag to GitHub
on:
push:
tags:
- "*"
- '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: docker.pkg.github.com/danger/danger-js/release
username: ${{ secrets.DOCKER_GITHUB_USERNAME }}
password: ${{ secrets.DOCKER_GITHUB_PASSWORD }}
registry: docker.pkg.github.com
- uses: actions/checkout@v2

- name: Export tag version
run: echo ::set-env name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Docker Login
run: echo $PACKAGES_WRITE_TOKEN | docker login docker.pkg.github.com -u $USERNAME --password-stdin
env:
PACKAGES_WRITE_TOKEN: ${{ secrets.DOCKER_GITHUB_PASSWORD }}
USERNAME: ${{ secrets.DOCKER_GITHUB_USERNAME }}
- name: Docker Build
run: docker build -t docker.pkg.github.com/danger/danger-js/danger-danger-js:$VERSION .
env:
USERNAME: ${{ secrets.DOCKER_GITHUB_USERNAME }}
- name: Deploy
run: docker push docker.pkg.github.com/danger/danger-js/danger-danger-js:$VERSION
env:
USERNAME: ${{ secrets.DOCKER_GITHUB_USERNAME }}

0 comments on commit 968d9de

Please sign in to comment.