Skip to content

fixed workflow typo #54

fixed workflow typo

fixed workflow typo #54

Workflow file for this run

name: Run CI then push to Docker Hub
on:
push:
tags:
- '*'
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Run CI tests
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@main
- name: Setup the UID env var
run: echo "CRAWL_UID=$(id -u)" >> $GITHUB_ENV
- name: Check the Docker Compose config
run: docker-compose config
- name: Build the containers
run: docker-compose build
- name: Set up output folders so that permissions are correct
run: |
mkdir -p ./target/integration-test-volumes/output
mkdir -p ./target/integration-test-volumes/scratch
mkdir -p ./target/integration-test-volumes/state
mkdir -p ./target/integration-test-volumes/wren
mkdir -p /tmp/webrender
chmod -R a+w ./target/integration-test-volumes
- name: Spin up the crawler
run: docker-compose up -d heritrix
- name: Show what is running
run: docker ps
- name: Run integration tests
run: docker-compose run robot
- name: Show what Heritrix logged, even if the tests failed
if: ${{ always() }}
run: docker-compose logs heritrix
- name: Show what WebRender logged, even if the tests failed
if: ${{ always() }}
run: docker-compose logs webrender
- name: Show what Warcprox logged, even if the tests failed
if: ${{ always() }}
run: docker-compose logs warcprox
# Make integration test results available, even if the tests failed
- uses: actions/upload-artifact@main
if: ${{ always() }}
with:
name: robot-ci-results
path: integration-test/results/
if-no-files-found: error
push_to_registries:
needs: test
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@main
- name: Set up Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ukwa/heritrix
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}