Add network policy to allow traffic from apps to the anvilops namespace #1
This file contains hidden or 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
| name: Build and Publish Dockerfile Builder Docker image | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "builders/dockerfile/**" | |
| workflow_dispatch: | |
| jobs: | |
| push_to_registry: | |
| name: Push Dockerfile Builder Docker image to Harbor | |
| runs-on: self-hosted | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - 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 Dockerfile Builder Docker image | |
| run: docker build --push -t registry.anvil.rcac.purdue.edu/anvilops/dockerfile-builder:${{ github.ref_name }}-${{ github.run_number }}-${{ github.sha }}${{ github.event_name == 'push' && ' -t registry.anvil.rcac.purdue.edu/anvilops/dockerfile-builder:latest' || '' }} --cache-from=type=registry,ref=registry.anvil.rcac.purdue.edu/anvilops/dockerfile-builder:latest --cache-to=type=inline ./builders/dockerfile | |
| - name: Log out of container registry | |
| if: always() | |
| run: docker logout registry.anvil.rcac.purdue.edu |