Skip to content

Implement pet tests #87

Implement pet tests

Implement pet tests #87

Workflow file for this run

name: CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build with Maven
run: mvn -B package --file pom.xml
env:
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
CUCUMBER_PUBLISH_ENABLED: true
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy to fly.io
if: success() && github.ref == 'refs/heads/main'
run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: Login to DockerHub
if: success() && github.ref == 'refs/heads/main'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Docker Hub
if: success() && github.ref == 'refs/heads/main'
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
udlepssoftarch/mypets-geiade-api:${{ github.sha }}
udlepssoftarch/mypets-geiade-api:latest