Skip to content

Commit

Permalink
Publish release to GHCR
Browse files Browse the repository at this point in the history
  • Loading branch information
drakon64 committed Dec 27, 2024
1 parent 86f25a5 commit bf150bd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 59 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ on:
- Ktisis.Processor/**
- npins/*

pull_request:
branches:
- main
paths:
- Ktisis.Common/**
- Ktisis.Receiver/**
- Ktisis.Processor/**
- npins/*

workflow_dispatch:

jobs:
Expand Down Expand Up @@ -46,8 +37,8 @@ jobs:
docker load < result-2
- run: |
docker tag ktisis-receiver:latest ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-receiver:beta
docker tag ktisis-processor:latest ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-processor:beta
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:
Expand Down
56 changes: 10 additions & 46 deletions .github/workflows/ktisis.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
name: Ktisis
on:
push:
branches:
- main
paths:
- Ktisis.Common/**
- Ktisis.Receiver/**
- Ktisis.Processor/**
- npins/*

pull_request:
branches:
- main
paths:
- Ktisis.Common/**
- Ktisis.Receiver/**
- Ktisis.Processor/**
- npins/*

workflow_dispatch:

jobs:
Deploy:
Docker:
permissions:
packages: write
contents: read
id-token: write

runs-on: ubuntu-latest
steps:
Expand All @@ -46,33 +28,15 @@ jobs:
docker load < result-2
- run: |
docker tag ktisis-receiver:latest ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-receiver:latest
docker tag ktisis-processor:latest ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-processor:latest
docker tag ktisis-processor:1.0.0 ghcr.io/${{ github.repository }}/ktisis-processor:1.0.0
docker tag ktisis-receiver:1.0.0 ghcr.io/${{ github.repository }}/ktisis-receiver:1.0.0
- uses: google-github-actions/auth@v2
- uses: docker/login-action@v3
with:
project_id: ${{ secrets.GOOGLE_PROJECT_ID }}
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
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- run: |
docker push ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-receiver:latest
docker push ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-processor:latest
- uses: google-github-actions/deploy-cloudrun@v2
with:
service: ktisis-receiver
image: ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-receiver:latest
project_id: ${{ secrets.GOOGLE_PROJECT_ID }}
region: ${{ vars.GOOGLE_REGION }}

- uses: google-github-actions/deploy-cloudrun@v2
with:
service: ktisis-processor
image: ${{ secrets.GOOGLE_ARTIFACT_REGISTRY }}/ktisis-processor:latest
project_id: ${{ secrets.GOOGLE_PROJECT_ID }}
region: ${{ vars.GOOGLE_REGION }}
docker push ghcr.io/${{ github.repository }}/ktisis-processor:1.0.0
docker push ghcr.io/${{ github.repository }}/ktisis-receiver:1.0.0
2 changes: 1 addition & 1 deletion Ktisis.Processor/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ pkgs.dockerTools.buildLayeredImage {

contents = with pkgs; [ cacert ];

tag = "latest";
tag = "1.0.0";
}
2 changes: 1 addition & 1 deletion Ktisis.Receiver/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ pkgs.dockerTools.buildLayeredImage {

contents = with pkgs; [ cacert ];

tag = "latest";
tag = "1.0.0";
}

0 comments on commit bf150bd

Please sign in to comment.