Skip to content

Commit

Permalink
actions: Added push to DockerHub.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilev authored Feb 25, 2020
1 parent e050758 commit 2fe39ef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- v*

jobs:
# Push image to GitHub Package Registry.
# Push image to Package Registries (GitHub and DockerHub).
build-and-push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
Expand All @@ -17,8 +17,10 @@ jobs:
- name: Build the Docker image
run: docker build . --file Dockerfile --tag vasilev/palemoon

- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Log into registries
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Push image
run: |
Expand All @@ -35,3 +37,5 @@ jobs:
docker tag vasilev/palemoon $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
docker tag vasilev/palemoon vasilev/palemoon:$VERSION
docker push vasilev/palemoon:$VERSION

0 comments on commit 2fe39ef

Please sign in to comment.