Merge pull request #2924 from metacpan/oalders/global #16
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 production container | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
docker: | |
runs-on: ubuntu-22.04 | |
name: Docker Push | |
steps: | |
- uses: actions/checkout@v3 | |
- name: docker build | |
run: docker build . -t metacpan/metacpan-web:latest -t metacpan/metacpan-web:$GITHUB_SHA | |
- name: run Perl tests | |
run: docker run -i metacpan/metacpan-web carton exec prove -lr --jobs 2 t | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USER }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Push build to Docker Hub | |
run: docker push metacpan/metacpan-web:latest |