publish new tagged image on push to master
All checks were successful
Build and publish Image / build-and-push (push) Successful in 46s
All checks were successful
Build and publish Image / build-and-push (push) Successful in 46s
This commit is contained in:
@@ -7,6 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
Patch:
|
||||
name: Patch
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -28,4 +29,33 @@ jobs:
|
||||
echo "The current tag is: ${{ steps.taggerDryRun.outputs.tag }}"
|
||||
- name: echo part
|
||||
run: |
|
||||
echo "The version increment was: ${{ steps.taggerDryRun.outputs.part }}"
|
||||
echo "The version increment was: ${{ steps.taggerDryRun.outputs.part }}"
|
||||
|
||||
Build-and-Publish:
|
||||
name: Build and Publish
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Docker
|
||||
run: curl -fsSL https://get.docker.com | sh
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t harbor.evanshome.io/library/py-eagle-mqtt:latest ./Docker/
|
||||
|
||||
- name: Minor version for each merge
|
||||
id: taggerFinal
|
||||
uses: anothrNick/github-tag-action@1.67.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.REPO_PUSH_TOKEN }}
|
||||
WITH_V: true
|
||||
|
||||
- name: tag with name
|
||||
run: docker tag harbor.evanshome.io/library/py-eagle-mqtt:latest harbor.evanshome.io/library/py-eagle-mqtt:${{ steps.taggerFinal.outputs.new_tag }}
|
||||
|
||||
- name: Login to Harbor
|
||||
run: docker login -u ${{ secrets.HARBOR_USERNAME }} -p ${{ secrets.HARBOR_PASSWORD }} harbor.evanshome.io
|
||||
|
||||
- name: Push Docker image to Harbor
|
||||
run: docker push --all-tags harbor.evanshome.io/library/py-eagle-mqtt
|
||||
Reference in New Issue
Block a user