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

push to dockerhub on tag #10

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
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
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,34 @@ jobs:
run: |
docker build -t octave .
docker run -t octave example1.m arg1 arg2
upload:
needs: build
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
env:
name: openmicroscopy/octave
steps:
- name: Get other tags
id: gettags
uses: jupyterhub/action-major-minor-tag-calculator@v3
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: "${{ env.name }}:"
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.name }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v4
with:
tags: ${{ join(fromJson(steps.gettags.outputs.tags)) }}
labels: ${{ steps.meta.outputs.labels }}
push: true