Extend allowed conflict list #152
Workflow file for this run
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: Scala build and test | |
on: [push, pull_request] | |
jobs: | |
# Label of the container job | |
sbt-build-test: | |
# Containers must run in Linux based operating systems | |
runs-on: ubuntu-latest | |
steps: | |
# Downloads a copy of the code in your repository before running CI tests | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- uses: olafurpg/setup-scala@v13 | |
with: | |
java-version: [email protected] | |
- name: Compile | |
run: sbt compile | |
- name: Package | |
run: sbt assembly | |
env: | |
NOTIFICATION_SENDER: ${{ secrets.NOTIFICATION_SENDER }} | |
RIPENCC_CONTACT: ${{ secrets.RIPENCC_CONTACT }} | |
APNIC_CONTACT: ${{ secrets.APNIC_CONTACT }} | |
ARIN_CONTACT: ${{ secrets.ARIN_CONTACT }} | |
LACNIC_CONTACT: ${{ secrets.LACNIC_CONTACT }} | |
AFRINIC_CONTACT: ${{ secrets.AFRINIC_CONTACT }} | |
RSCG_CONTACT: ${{ secrets.RSCG_CONTACT }} | |
- name: Create artifacts directory | |
run: mkdir artifacts | |
- name: Rename the package | |
run: mv $(find target -name nro-delegated-stats.jar) artifacts/ | |
- name: Upload jar | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: artifacts | |
- name: Upload reports | |
uses: actions/upload-artifact@v3 | |
with: | |
name: reports | |
path: | | |
target/scoverage-report/**/* | |
target/test-reports/**/* | |
docker: | |
runs-on: ubuntu-latest | |
needs: sbt-build-test | |
steps: | |
- name: checkout sources | |
uses: actions/checkout@v3 | |
- name: Fetch jar | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifacts | |
- name: Check the artifacts | |
run: ls -ltR | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Get image tag | |
shell: bash | |
run: | | |
if [ $GITHUB_REF = "refs/heads/main" ]; then BRANCH=latest; else BRANCH=${GITHUB_REF##*/}; fi | |
echo "##[set-output name=branch;]$(echo $BRANCH)" | |
id: branch_name | |
- name: Build and push | |
id: docker_build_nro_delegated_stats | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: ghcr.io/ripe-ncc/nro-delegated-stats:${{ steps.branch_name.outputs.branch }} | |
labels: "org.label-schema.vcs-ref=${{ github.sha }}" | |
- name: Image digest | |
run: echo ${{ steps.docker_build_nro_delegated_stats.outputs.digest }} | |