Skip to content

Commit

Permalink
ci: Beta docker image from other branches
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan van Rooij committed May 30, 2020
1 parent 9e743f8 commit 05ff57d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/npm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
if: steps.semantic.outputs.new_release_published == 'true'
run:
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Publish to docker with buildx
if: steps.semantic.outputs.new_release_published == 'true'
- name: Publish to docker with buildx as latest
if: steps.semantic.outputs.new_release_published == 'true' && github.ref == 'refs/heads/master'
run: |
docker buildx build \
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
Expand All @@ -55,3 +55,15 @@ jobs:
--build-arg BUILD_VERSION=${{ steps.semantic.outputs.new_release_version }} \
--build-arg VSC_REF=$(echo ${GITHUB_SHA} | cut -c1-8) \
.
- name: Publish to docker with buildx as latest
if: steps.semantic.outputs.new_release_published == 'true' && github.ref != 'refs/heads/master'
run: |
docker buildx build \
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
--push \
-t svrooij/smartmeter:beta \
-t svrooij/smartmeter:${{ steps.semantic.outputs.new_release_version }} \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg BUILD_VERSION=${{ steps.semantic.outputs.new_release_version }} \
--build-arg VSC_REF=$(echo ${GITHUB_SHA} | cut -c1-8) \
.

0 comments on commit 05ff57d

Please sign in to comment.