diff --git a/.github/workflows/cicd-prod.yml b/.github/workflows/cicd-prod.yml new file mode 100644 index 0000000..698d1b1 --- /dev/null +++ b/.github/workflows/cicd-prod.yml @@ -0,0 +1,47 @@ +name: gol2 + +on: + push: + tags: + - 'v*' + workflow_dispatch: + +jobs: + Build: + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.meta.outputs.version }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: europe-west9-docker.pkg.dev/gol2-development/gol2-indexer/dev + flavor: latest=false + tags: | + type=ref,event=tag + + - uses: 'google-github-actions/auth@v2' + id: auth + with: + token_format: access_token + project_id: 'gol2-production' + credentials_json: '${{ secrets.GOOGLE_CREDENTIALS_PROD }}' + + - name: Login to GAR + uses: docker/login-action@v3 + with: + registry: europe-west9-docker.pkg.dev + username: oauth2accesstoken + password: ${{ steps.auth.outputs.access_token }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + file: Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 2df7c3a..f162731 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -4,6 +4,7 @@ on: push: branches: - 'main' + - 'update-starknet' workflow_dispatch: jobs: @@ -45,6 +46,4 @@ jobs: file: Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - secrets: | - "certificate=${{ secrets.CERTIFICATE }}" \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index cc364a6..1130557 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,6 @@ FROM node:16.15.1 ADD indexer/ /app WORKDIR /app -RUN --mount=type=secret,id=certificate \ - cat /run/secrets/certificate >> /app/ca-certificate.crt RUN yarn install && yarn build