diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..a1158b6733 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI +on: + push: + branches: ["supplychain-*"] + pull_request: + branches: ["supplychain-*"] + +jobs: + build: + name: Build + runs-on: ${{ github.event.pull_request.head.repo.fork && 'ubuntu-latest' || 'ubuntu-x64' }} + environment: test_docker + permissions: + id-token: write + contents: read + timeout-minutes: 20 + steps: + - name: Checkout twilio-java + uses: actions/checkout@a37ce9120846195fa4ece8f58b268e6043cb2f26 # v3 + + - name: Set up Java + uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3 + with: + distribution: "temurin" + java-version: "11" + cache: "maven" + + - name: Artifactory OIDC + if: ${{ !github.event.pull_request.head.repo.fork }} + uses: twilio/sdk-actions/artifactory-oidc@6edb931787e355cc04603d7708cd09ad8cf574a6 # java_maven + with: + ecosystem: "maven" + + - name: Docker Hub OIDC + if: ${{ !github.event.pull_request.head.repo.fork }} + uses: twilio/sdk-actions/dockerhub-oidc@6edb931787e355cc04603d7708cd09ad8cf574a6 # java_maven + + - name: Pull Docker image + if: ${{ !github.event.pull_request.head.repo.fork }} + # Placeholder for docker build and push — validates Docker Hub OIDC login + run: docker pull twilio/twilio-java:latest + + - run: | + echo "Trying out an env var: ${{ vars.TEST_VAR }}" + echo "putting the secret in the file:" + echo "${{ secrets.TEST_SECRET }}" > test_secret.txt + ls -l test_secret.txt + cat test_secret.txt + od test_secret.txt + - run: mvn install -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B -V diff --git a/pom.xml b/pom.xml index b9be5c8152..5b586a4d35 100644 --- a/pom.xml +++ b/pom.xml @@ -200,7 +200,7 @@ 2.18.6 - 3.3.1 + 3.12.0 0.12.6 1.18.34 5.14.2 @@ -424,7 +424,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.3.0 + 3.8.0 jar-with-dependencies @@ -443,7 +443,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.1.1 + 3.6.0 checkstyle.xml @@ -451,7 +451,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.4.0 attach-sources @@ -490,7 +490,7 @@ org.apache.maven.plugins maven-release-plugin - 2.5.3 + 3.3.1 @{project.version} -DskipTests=${skip.tests} @@ -534,7 +534,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0 + 3.4.1 enforce-versions