Merge pull request #8 from dockerstuff/test #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build and publish container images | |
# | |
# There are three images in this repo we want to build and publish individually: | |
# - GISPy | |
# - ISIS | |
# - ASP | |
# | |
# The images should be tagged as 'latest' and "$VERSION", where the version | |
# will point unequivocally to a git commit/tag of this repo. | |
# 'latest' will be the latest version of repository in 'stable' branch. | |
# | |
# Reference docs: | |
# - docs.github.com/en/actions/publishing-packages/publishing-docker-images | |
name: Build and Publish Containers | |
# Controls when the action will run. Triggers the workflow on push request, or repository dispatch | |
on: | |
# Runs when pushing to 'stable' branch | |
push: | |
# branches: | |
# - 'stable' | |
# - 'test' | |
branches-ignore: | |
- 'master' | |
tags: | |
- '*' | |
# Run in every PR too | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# gispy: | |
# uses: ./.github/workflows/workflow_build.yml | |
# with: | |
# image_name: ${{ vars.DOCKERHUB_USERNAME }}/jupyter-gispy | |
# context_path: ./dockerfiles | |
# dockerfile_path: ./dockerfiles/gispy.dockerfile | |
# secrets: inherit | |
# isis: | |
# uses: ./.github/workflows/workflow_build.yml | |
# with: | |
# image_name: ${{ vars.DOCKERHUB_USERNAME }}/jupyter-isis | |
# context_path: ./dockerfiles | |
# dockerfile_path: ./dockerfiles/isis.dockerfile | |
# secrets: inherit | |
isis: | |
runs-on: ubuntu-latest | |
steps: | |
- # https://github.com/marketplace/actions/checkout | |
name: Checkout | |
uses: actions/checkout@v4 | |
- # https://github.com/marketplace/actions/docker-metadata-action | |
name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
${{ vars.DOCKERHUB_USERNAME }}/jupyter-isis | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=ref,event=tag | |
type=ref,event=branch | |
# type=ref,event=branch,enable=${{ github.ref != format('refs/heads/{0}', 'master') }} | |
# type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'stable') }} | |
# type=sha | |
# - # https://github.com/marketplace/actions/docker-setup-qemu | |
# name: Set up QEMU | |
# uses: docker/setup-qemu-action@v3 | |
# - # https://github.com/marketplace/actions/docker-setup-buildx | |
# name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v3 | |
# - # https://github.com/marketplace/actions/docker-login | |
# name: Login to Docker Hub | |
# uses: docker/login-action@v3 | |
# with: | |
# username: ${{ secrets.DOCKERHUB_USERNAME }} | |
# password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# - # https://github.com/marketplace/actions/build-and-push-docker-images | |
# name: Build, push and export | |
# uses: docker/build-push-action@v5 | |
# with: | |
# context: ./dockerfiles | |
# file: ./dockerfiles/isis.dockerfile | |
# push: ${{ github.event_name == 'push' }} | |
# tags: ${{ steps.meta.outputs.tags }} | |
# # outputs: type=docker,dest=/tmp/isis_image.tar | |
# - # https://docs.docker.com/build/ci/github-actions/share-image-jobs/ | |
# name: Upload artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: isis_image | |
# path: /tmp/isis_image.tar | |
- | |
name: tags | |
run: echo ${{ steps.meta.outputs.tags }} | |
- | |
name: tag-0 | |
run: echo ${{ steps.meta.outputs.tags[0] }} | |
- | |
name: tag-first | |
run: echo ${{ steps.meta.outputs.tags.first }} | |
- | |
name: env | |
run: echo ${{ env }} | |
- | |
name: env-tags | |
run: echo $DOCKER_METADATA_OUTPUT_TAGS | |
- | |
name: env-tag-0 | |
run: echo ${DOCKER_METADATA_OUTPUT_TAGS[0]} | |
- | |
name: env-tag-1 | |
run: echo ${DOCKER_METADATA_OUTPUT_TAGS[1]} | |
# isis-asp: | |
# needs: isis | |
# runs-on: ubuntu-latest | |
# steps: | |
# - | |
# name: | |
# uses: ./.github/workflows/workflow_build.yml | |
# with: | |
# base_image_name: ${{ vars.DOCKERHUB_USERNAME }}/jupyter-isis | |
# image_name: ${{ vars.DOCKERHUB_USERNAME }}/jupyter-isis-asp | |
# context_path: ./dockerfiles | |
# dockerfile_path: ./dockerfiles/isis.dockerfile | |
# secrets: inherit |