Clean up GitHub actions workflow #17
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: | |
push: | |
branches: [ master ] | |
pull_request: | |
schedule: | |
- cron: "0 3 * * 1" # Run every Monday at 3:00 | |
jobs: | |
build: | |
strategy: | |
matrix: | |
cloud: [amazon, azure, google, digital-ocean] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Build image | |
run: |- | |
make build-${{ matrix.cloud }} | |
- name: Test image | |
run: |- | |
make test-${{ matrix.cloud }} | |
- name: Push image | |
if: (github.ref == 'refs/heads/master' && github.event_name == 'push') || contains(github.ref, 'refs/tags/') | |
run: |- | |
make push-${{ matrix.cloud }} |