CI/CD #48
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: CI/CD | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: '0 0 1 * *' | |
jobs: | |
build: | |
name: CI/CD tag | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
tag: [ web7.3, web7.4, web8.0 ] | |
env: | |
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | |
TAG: ${{ matrix.tag }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build the Docker image | |
run: make build TAG=$TAG | |
- name: Start an instance of the container | |
run: make start TAG=$TAG | |
- name: Waiting for the healthcheck | |
run: sleep 15 | |
- name: Testing image health | |
run: make test TAG=$TAG | |
- name: Publishing new image | |
if: ${{ success() }} | |
run: docker login -u="jeroeng" -p="$DOCKER_TOKEN" && docker push jeroeng/alpine-artisan:$TAG |