ci: manually trigger the ci #4
This file contains hidden or 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
| # yamllint disable rule:line-length | |
| name: publish-nginx | |
| on: # yamllint disable-line rule:truthy | |
| push: | |
| tags: | |
| - v* | |
| branches: | |
| - feat/nginx-config-as-artifact | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| release: | |
| name: Release nginx configs and image | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-hathor-env | |
| name: Setup Hathor node environment | |
| with: | |
| python: '3.12' | |
| os: 'ubuntu-24.04' | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "version=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT | |
| - name: Configure AWS credentials (OIDC) | |
| uses: aws-actions/configure-aws-credentials@v6 | |
| with: | |
| role-to-assume: arn:aws:iam::769498303037:role/GitHubActionsNginxConfigUploadRole | |
| aws-region: us-east-1 | |
| - name: Generate all nginx configs | |
| working-directory: extras/nginx_docker | |
| run: poetry run make generate-all VERSION=${{ steps.version.outputs.version }} | |
| - name: Upload configs to S3 (versioned) | |
| working-directory: extras/nginx_docker | |
| run: make upload-to-s3 VERSION=${{ steps.version.outputs.version }} | |
| - name: Upload configs to S3 (latest) | |
| working-directory: extras/nginx_docker | |
| run: make upload-to-s3-as-latest VERSION=${{ steps.version.outputs.version }} | |
| - name: Generate set_real_ip_from_cloudfront | |
| working-directory: extras/nginx_docker | |
| run: make set_real_ip_from_cloudfront | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| # --- AWS ECR --- | |
| - name: Login to Amazon ECR | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| - name: Build and push to ECR | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: extras/nginx_docker | |
| push: true | |
| platforms: linux/amd64,linux/arm64/v8 | |
| tags: | | |
| 769498303037.dkr.ecr.us-east-1.amazonaws.com/webtank:${{ steps.version.outputs.version }} | |
| 769498303037.dkr.ecr.us-east-1.amazonaws.com/webtank:latest | |
| # --- GCP Artifact Registries --- | |
| # standalone-fullnodes | |
| - name: Authenticate to GCP (standalone-fullnodes) | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| workload_identity_provider: projects/${{ vars.SF_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/github/providers/github | |
| service_account: '' | |
| id: gcp-auth-sf | |
| - name: Configure Docker for Artifact Registry (standalone-fullnodes) | |
| run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet | |
| - name: Build and push to standalone-fullnodes | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: extras/nginx_docker | |
| push: true | |
| platforms: linux/amd64,linux/arm64/v8 | |
| tags: | | |
| us-central1-docker.pkg.dev/standalone-fullnodes/fullnodes/webtank:${{ steps.version.outputs.version }} | |
| us-central1-docker.pkg.dev/standalone-fullnodes/fullnodes/webtank:latest | |
| # hathor-testnet | |
| - name: Authenticate to GCP (hathor-testnet) | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| workload_identity_provider: projects/${{ vars.HT_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/github/providers/github | |
| service_account: '' | |
| id: gcp-auth-ht | |
| - name: Configure Docker for Artifact Registry (hathor-testnet) | |
| run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet | |
| - name: Build and push to hathor-testnet | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: extras/nginx_docker | |
| push: true | |
| platforms: linux/amd64,linux/arm64/v8 | |
| tags: | | |
| us-central1-docker.pkg.dev/hathor-testnet/fullnodes/webtank:${{ steps.version.outputs.version }} | |
| us-central1-docker.pkg.dev/hathor-testnet/fullnodes/webtank:latest | |
| # ekvilibro | |
| - name: Authenticate to GCP (ekvilibro) | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| workload_identity_provider: projects/${{ vars.EKV_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/github/providers/github | |
| service_account: '' | |
| id: gcp-auth-ekv | |
| - name: Configure Docker for Artifact Registry (ekvilibro) | |
| run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet | |
| - name: Build and push to ekvilibro | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: extras/nginx_docker | |
| push: true | |
| platforms: linux/amd64,linux/arm64/v8 | |
| tags: | | |
| us-central1-docker.pkg.dev/ekvilibro/fullnodes/webtank:${{ steps.version.outputs.version }} | |
| us-central1-docker.pkg.dev/ekvilibro/fullnodes/webtank:latest | |
| # hathor-testnet-playground | |
| - name: Authenticate to GCP (hathor-testnet-playground) | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| workload_identity_provider: projects/${{ vars.HTP_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/github/providers/github | |
| service_account: '' | |
| id: gcp-auth-htp | |
| - name: Configure Docker for Artifact Registry (hathor-testnet-playground) | |
| run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet | |
| - name: Build and push to hathor-testnet-playground | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: extras/nginx_docker | |
| push: true | |
| platforms: linux/amd64,linux/arm64/v8 | |
| tags: | | |
| us-central1-docker.pkg.dev/hathor-testnet-playground/fullnodes/webtank:${{ steps.version.outputs.version }} | |
| us-central1-docker.pkg.dev/hathor-testnet-playground/fullnodes/webtank:latest |