Skip to content

deploy-image

deploy-image #15

Workflow file for this run

name: deploy-image
on:
workflow_dispatch: {}
jobs:
deploy:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: Configure Docker
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
- name: Build Docker image
run: docker build ./operator -t us-central1-docker.pkg.dev/$GCP_PROJECT/argus/controller:${{steps.tag_version.outputs.new_tag}} -t us-central1-docker.pkg.dev/$GCP_PROJECT/argus/controller:latest
- name: Push Docker image
run: docker push us-central1-docker.pkg.dev/$GCP_PROJECT/argus/controller:${{steps.tag_version.outputs.new_tag}}
- name: Push Latest
run: docker push us-central1-docker.pkg.dev/$GCP_PROJECT/argus/controller:latest