Skip to content

Commit

Permalink
feat: upload docker image to github (#3384)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Dec 28, 2019
1 parent 081ae49 commit 6674529
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 16 deletions.
Binary file modified .azure/azure.sig
Binary file not shown.
13 changes: 0 additions & 13 deletions .azure/step-docker-push-bintray.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .azure/step-docker-push-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
steps:
- task: Docker@2
displayName: Login to docker
inputs:
command: login
containerRegistry: docker-github

- script: make docker_push_github
displayName: Publish docker image
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### New features:

* Save contact tags in vCard 'CATEGORIES' field
* Upload master docker image to GitHub packages

### Enhancements:

Expand Down
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,19 @@ docker_push_bintray_fpm: .deploy.json
docker push monicahq-docker-docker.bintray.io/$(DOCKER_IMAGE):$(BUILD)-fpm
BUILD=$(BUILD)-fpm scripts/ci/fix-bintray.sh

.PHONY: docker docker_build docker_build_master docker_build_apache docker_build_fpm docker_build_php_apache docker_tag docker_push docker_push_bintray docker_push_bintray_apache docker_push_bintray_fpm
docker_push_github: docker_push_github_apache docker_push_github_fpm

docker_push_githuby_apache:
docker tag $(DOCKER_IMAGE) docker.pkg.github.com/monicahq/monica/$(DOCKER_IMAGE):$(BUILD)
docker push docker.pkg.github.com/monicahq/monica/$(DOCKER_IMAGE):$(BUILD)

docker_push_github_fpm:
docker tag $(DOCKER_IMAGE) docker.pkg.github.com/monicahq/monica/$(DOCKER_IMAGE):$(BUILD)-fpm
docker push docker.pkg.github.com/monicahq/monica/$(DOCKER_IMAGE):$(BUILD)-fpm

.PHONY: docker docker_build docker_build_master docker_build_apache docker_build_fpm docker_build_php_apache docker_tag
.PHONY: docker_push docker_push_bintray docker_push_bintray_apache docker_push_bintray_fpm
.PHONY: docker_push_github docker_push_githuby_apache docker_push_github_fpm

build:
composer install --no-interaction --no-suggest --ignore-platform-reqs
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ stages:
steps:
- template: .azure/step-prepare-environment.yml
- template: .azure/step-docker-build.yml
- template: .azure/step-docker-push-bintray.yml
- template: .azure/step-docker-push-github.yml

- job: deploy_docker
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
Expand All @@ -79,5 +79,5 @@ stages:
steps:
- template: .azure/step-prepare-environment.yml
- template: .azure/step-docker-build.yml
- template: .azure/step-docker-push-bintray.yml
- template: .azure/step-docker-push-github.yml
- template: .azure/step-docker-push.yml

0 comments on commit 6674529

Please sign in to comment.