Skip to content

Initial commit

Initial commit #1

name: Docker Image CI py-rocket-base
env:
IMAGE_NAME: py-rocket-base
IMAGE_TAG: 4.3.3-3.10
on:
workflow_dispatch: null
push:
branches: main
paths:
- 'images/py-rocket-base/**'
- '.github/workflows/docker-image-py-rocket-base.yml'
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
if: github.repository == 'nmfs-opensci/container-images'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build the Docker image
if: github.repository == 'nmfs-opensci/container-images'
run: |
docker build images/$IMAGE_NAME -f images/$IMAGE_NAME/Dockerfile --tag ghcr.io/nmfs-opensci/container-images/$IMAGE_NAME:$IMAGE_TAG
- name: Publish
if: github.repository == 'nmfs-opensci/container-images'
run: |
docker push ghcr.io/nmfs-opensci/container-images/$IMAGE_NAME:$IMAGE_TAG