Fix custom GHA action publish_docker_image structure #43
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
name: Build Docker images | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
name: Build and test Docker Image | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build image for testing | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
tags: docker-erddap-test | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
outputs: type=docker | |
- name: Run Docker Image in Background | |
run: docker run -d -p 8080:8080 docker-erddap-test | |
- name: Check that ERDDAP Docker Image will return a 200 | |
uses: ifaxity/wait-on-action@v1 | |
timeout-minutes: 1 | |
with: | |
resource: http://localhost:8080/erddap/index.html | |
- name: Publish Docker images | |
if: | | |
((github.event_name == 'release' && github.event.action == 'published') || github.ref == 'refs/heads/main') | |
&& github.repository == 'axiom-data-science/docker-erddap' | |
uses: ./.github/actions/publish_docker_image |