Skip to content

Commit

Permalink
Improve CI and print a valid known_hosts. (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch authored Jun 28, 2024
1 parent 7265e2b commit ab2b059
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,32 @@ jobs:
credentials_json: ${{ secrets.INFRASTRUCTURE_SERVICE_ACCOUNT_JSON_KEY }}
service_account: [email protected]

- name: Build Docker Image
run: |
make image
- name: Print known-hosts
run: |
ssh-keyscan github.com >> known_hosts
echo "You can use the following known_hosts file to add to your secrets"
cat known_hosts
- name: Set up Cloud SDK
if: |
github.event_name == 'release' ||
github.event_name == 'push' && github.ref_name == 'master'
uses: google-github-actions/setup-gcloud@v0
with:
project_id: infrastructure-220307

- name: Build Docker Image
run: |
gcloud config set project infrastructure-220307
gcloud auth configure-docker
make image
- name: Upload image
if: |
github.event_name == 'release' ||
github.event_name == 'push' && github.ref_name == 'master'
env:
GCLOUD_IMAGE_TAG: ${{ steps.publish.outputs.tag }}
run: |
make gcloud
gcloud config set project infrastructure-220307
gcloud auth configure-docker
- name: Delete secrets
if: always()
run: |
rm -f private_ssh_key
make gcloud

0 comments on commit ab2b059

Please sign in to comment.