Add labels to Docker images #40
This file contains 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: Ktisis Beta | |
on: | |
push: | |
branches: | |
- beta | |
paths: | |
- Ktisis.Common/** | |
- Ktisis.Receiver/** | |
- Ktisis.Processor/** | |
- npins/* | |
workflow_dispatch: | |
jobs: | |
Deploy: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
curl --proto '=https' --tlsv1.2 -sSf -L https://install.lix.systems/lix | sh -s -- install --no-confirm | |
echo "trusted-users = root runner" | sudo tee -a /etc/nix/nix.conf | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: drakon64-ktisis | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- run: nix-build Ktisis.Processor/docker.nix Ktisis.Receiver/docker.nix | |
- run: | | |
docker load < result | |
docker load < result-2 | |
- run: | | |
docker tag ktisis-receiver:1.0.0 ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-receiver:beta | |
docker tag ktisis-processor:1.0.0 ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-processor:beta | |
- uses: google-github-actions/auth@v2 | |
with: | |
project_id: ${{ secrets.GOOGLE_PROJECT_ID_BETA }} | |
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} | |
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }} | |
- uses: google-github-actions/setup-gcloud@v2 | |
- run: gcloud auth configure-docker ${{ vars.GOOGLE_REGION }}-docker.pkg.dev | |
- run: | | |
docker push ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-receiver:beta | |
docker push ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-processor:beta | |
- uses: google-github-actions/deploy-cloudrun@v2 | |
with: | |
service: ktisis-receiver | |
image: ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-receiver:beta | |
project_id: ${{ secrets.GOOGLE_PROJECT_ID_BETA }} | |
region: ${{ vars.GOOGLE_REGION }} | |
- uses: google-github-actions/deploy-cloudrun@v2 | |
with: | |
service: ktisis-processor | |
image: ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-processor:beta | |
project_id: ${{ secrets.GOOGLE_PROJECT_ID_BETA }} | |
region: ${{ vars.GOOGLE_REGION }} |