diff --git a/.github/workflows/ci-deploy.yml b/.github/workflows/ci-deploy.yml deleted file mode 100644 index 3e481bd..0000000 --- a/.github/workflows/ci-deploy.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: ci-deploy -on: - workflow_dispatch: - inputs: - version: - required: true - description: Version to deploy -jobs: - deploy: - runs-on: ubuntu-22.04 - environment: dev - env: - APP_VERSION: ${{ github.event.inputs.version }} - steps: - - name: cf setup - run: |- - curl -sL "https://packages.cloudfoundry.org/stable?release=${CF_RELEASE}&version=${CF_VERSION}" | \ - sudo tar -zx -C /usr/local/bin - env: - CF_VERSION: 7.2.0 - CF_RELEASE: linux64-binary - - name: cf push - run: |- - cf api ${CF_API} - cf auth - cf target -o ${CF_ORG} -s ${CF_SPACE} - cf push ${APP_NAME} --docker-image ${APP_IMAGE}:${APP_VERSION} --docker-username ${CF_DOCKER_USERNAME} - env: - APP_NAME: dgca-verifier-service-eu-test - APP_IMAGE: docker.pkg.github.com/${{ github.repository }}/tng-key-distribution - CF_API: ${{ secrets.CF_API }} - CF_ORG: ${{ secrets.CF_ORG }} - CF_SPACE: ${{ secrets.CF_SPACE }} - CF_USERNAME: ${{ secrets.CF_USERNAME }} - CF_PASSWORD: ${{ secrets.CF_PASSWORD }} - CF_DOCKER_USERNAME: ${{ secrets.CF_DOCKER_USERNAME }} - CF_DOCKER_PASSWORD: ${{ secrets.CF_DOCKER_PASSWORD }} diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index f1751ac..53cda92 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -3,6 +3,7 @@ on: push: branches: - main + jobs: build: runs-on: ubuntu-22.04 @@ -46,15 +47,16 @@ jobs: APP_PACKAGES_USERNAME: ${{ github.actor }} APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - name: docker - run: |- - echo "${APP_PACKAGES_PASSWORD}" | docker login "${APP_PACKAGES_URL}" \ - --username "${APP_PACKAGES_USERNAME}" \ - --password-stdin - docker build . \ - --file ./Dockerfile \ - --tag "${APP_PACKAGES_URL}:${APP_VERSION}" - docker push "${APP_PACKAGES_URL}:${APP_VERSION}" + run: >- + echo "${APP_PACKAGES_PASSWORD}" | + docker login "${APP_PACKAGES_URL}" + --username "${APP_PACKAGES_USERNAME}" + --password-stdin; + docker build . + --file ./Dockerfile + --tag "${APP_PACKAGES_URL}:${APP_VERSION}"; + docker push "${APP_PACKAGES_URL}:${APP_VERSION}"; env: - APP_PACKAGES_URL: docker.pkg.github.com/${{ github.repository }}/dgca-verifier-service + APP_PACKAGES_URL: ghcr.io/worldhealthorganization/tng-key-distribution/tng-key-distribution APP_PACKAGES_USERNAME: ${{ github.actor }} APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci-sonar.yml b/.github/workflows/ci-sonar.yml deleted file mode 100644 index be6e0bc..0000000 --- a/.github/workflows/ci-sonar.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: ci-sonar -on: - push: - branches: - - main - pull_request: - types: - - opened - - synchronize - - reopened -jobs: - sonar: - runs-on: ubuntu-22.04 - steps: - - uses: actions/setup-java@v2 - with: - java-version: 17 - distribution: adopt - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/cache@v2 - with: - path: | - ~/.m2/repository - key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }} - - name: mvn - run: |- - mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ - --batch-mode \ - --file ./pom.xml \ - --settings ./settings.xml \ - --define app.packages.username="${APP_PACKAGES_USERNAME}" \ - --define app.packages.password="${APP_PACKAGES_PASSWORD}" - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - APP_PACKAGES_USERNAME: ${{ github.actor }} - APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }}