Files
scs-100/.github/mavenpublish.yml
Jay Ehsaniara b5cef685ec 📝 action configs
2021-07-12 22:17:03 -07:00

38 lines
962 B
YAML

name: Java CI
on:
push:
paths:
- 'scs-101/**'
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Deploy to Github Package Registry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn -f scs-101/scs-101-commons deploy
- name: Docker Build and Push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd scs-101/scs-101-inventory-check
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
docker build --build-arg GITHUB_TOKEN=$GITHUB_TOKEN -t ghcr.io/ehsaniara/scs-kafka-intro:scs-101-inventory-check-latest .
docker push ghcr.io/ehsaniara/scs-kafka-intro:scs-101-inventory-check-latest