Tag Latest #14029
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
| name: Tag Latest | |
| on: | |
| schedule: | |
| - cron: '0 */1 * * *' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/tags.yaml" | |
| - ".github/builder.py" | |
| - ".github/tag_latest.py" | |
| - ".github/workflows/build-docker-images.yml" | |
| - ".github/workflows/tag-latest.yml" | |
| workflow_dispatch: {} | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| tag-latest: | |
| environment: Configure CI/CD | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: 'Authenticate to Google Cloud' | |
| uses: 'google-github-actions/auth@v1' | |
| with: | |
| workload_identity_provider: 'projects/688237091507/locations/global/workloadIdentityPools/oidc-github-identity-pool/providers/oidc-github-provider' | |
| service_account: 'oidc-github-access@lavanet-public.iam.gserviceaccount.com' | |
| - name: 'Set up GCP CLI' | |
| uses: 'google-github-actions/setup-gcloud@v1' | |
| - name: 'GCP CLI Info' | |
| run: | | |
| gcloud info | |
| gcloud auth list --filter=status:ACTIVE --format="value(account)" | |
| - name: 'GCP set project' | |
| run: | | |
| gcloud config set project lavanet-public | |
| - name: 'Authenticate to Google Artifact' | |
| run: | | |
| gcloud auth configure-docker us-central1-docker.pkg.dev | |
| - name: "Get lavad" | |
| run: | | |
| export VERSION=$(cat .github/tags.yaml | yq e ".tags[2]" -o json - -r) | |
| mkdir bin | |
| curl -L -o bin/lavad https://github.com/lavanet/lava/releases/download/$VERSION/lavad-$VERSION-linux-amd64 | |
| chmod +x bin/lavad | |
| # tag latest | |
| - name: "Tag latest branch" | |
| run: | | |
| python3 .github/tag_latest.py "lava-consumer" | |
| python3 .github/tag_latest.py "lava-provider" | |
| python3 .github/tag_latest.py "lavap" |