Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Travis build with a GitHub Action #6690

Merged
merged 22 commits into from
Jan 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Work around earlier docker push version
  • Loading branch information
pazaan committed Dec 31, 2020
commit 2da1b8ebf9a70ce10477fd03608d90949c734762
22 changes: 12 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
name: Publish to Docker Hub
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master'
env:
DOCKER_IMAGE: nightscout/cgm-remote-monitor
steps:
Expand All @@ -57,17 +58,18 @@ jobs:
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: Build the Docker image
- name: Build and push the Docker image
if: success()
run: docker build --no-cache=true -t ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version}} .
- name: Tag the dev Docker image
run: |
docker build --no-cache=true -t ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version}} .
docker image push -a ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}
- name: Tag and push the dev Docker image
if: success() && github.ref == 'refs/heads/dev'
run: docker tag ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version}} ${{ env.DOCKER_IMAGE }}:latest_dev
- name: Tag the master Docker image
run: |
docker tag ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version}} ${{ env.DOCKER_IMAGE }}:latest_dev
docker image push -a ${{ env.DOCKER_IMAGE }}:latest_dev
- name: Tag and push the master Docker image
if: success() && github.ref == 'refs/heads/master'
run: docker tag ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version}} ${{ env.DOCKER_IMAGE }}:latest
- name: Push the Docker image
if: success()
run: |
docker image push --help
docker image push -a ${{ env.DOCKER_IMAGE }}
docker tag ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version}} ${{ env.DOCKER_IMAGE }}:latest
docker image push -a ${{ env.DOCKER_IMAGE }}:latest