Skip to content

v2.1.2

v2.1.2 #34

Workflow file for this run

name: Build Docker Image
on:
release:
types:
- published
jobs:
build:
name: Build Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build image
env:
DOCKER_BUILDKIT: 1
run: docker build . -t ${{ secrets.DOCKER_USER }}/rq-exporter:latest -t ${{ secrets.DOCKER_USER }}/rq-exporter:${{ github.ref_name }}
- name: Run the tests
run: docker run --rm --entrypoint python ${{ secrets.DOCKER_USER }}/rq-exporter:latest -m unittest
- name: Push image to Docker Hub
run: |
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
docker push ${{ secrets.DOCKER_USER }}/rq-exporter:latest
docker push ${{ secrets.DOCKER_USER }}/rq-exporter:${{ github.ref_name }}