Bump org.yaml:snakeyaml from 1.33 to 2.0 #74
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 | |
on: | |
# Triggers the workflow on push (branch and tag) or pull request events | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Java and Maven | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
cache: 'maven' | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Maven Package | |
env: | |
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password | |
run: | | |
mvn clean test --batch-mode -s settings.xml | |
- name: Slack | |
uses: 8398a7/action-slack@v3 | |
if: ${{ always() }} | |
with: | |
status: ${{ job.status }} | |
fields: repo,message,commit,author,ref,workflow,took,job | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Java and Maven | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
cache: 'maven' | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Maven Package | |
env: | |
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password | |
run: | | |
mvn clean package --batch-mode -Dmaven.test.skip=true -s settings.xml | |
- uses: actions/upload-artifact@v2 | |
if: ${{ success() }} | |
with: | |
name: service-listener.jar | |
path: target/service-listener.jar | |
- name: Slack | |
uses: 8398a7/action-slack@v3 | |
if: ${{ always() }} | |
with: | |
status: ${{ job.status }} | |
fields: repo,message,commit,author,ref,workflow,took,job | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
if: ${{ success() && startsWith(github.ref, 'refs/tags/')}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v2 | |
with: | |
name: service-listener.jar | |
path: ${{ github.workspace }}/target | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/*\//} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: boomerangio/flow-service-listener:latest,boomerangio/flow-service-listener:${{ steps.get_version.outputs.VERSION }} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |
- name: Slack | |
uses: 8398a7/action-slack@v3 | |
if: ${{ always() }} | |
with: | |
status: ${{ job.status }} | |
fields: repo,message,commit,author,ref,workflow,took,job | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |