Skip to content

Build and Publish Staging Docker image #3

Build and Publish Staging Docker image

Build and Publish Staging Docker image #3

name: Build and Publish AnvilOps Docker image
on:
workflow_dispatch:
jobs:
push_to_registry:
name: Push AnvilOps Docker image to Harbor (Development)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v6
- name: Log in to container registry
run: docker login -u '${{ secrets.DOCKER_USERNAME }}' -p '${{ secrets.DOCKER_PASSWORD }}' registry.anvil.rcac.purdue.edu
- name: Build and push AnvilOps Docker image
run: docker build --push -t registry.anvil.rcac.purdue.edu/anvilops-staging/anvilops:${{ github.run_number }}-${{ github.sha }} .
- name: Log out of container registry
if: always()
run: docker logout registry.anvil.rcac.purdue.edu