Skip to content

Commit

Permalink
use github ref name in the image name creation
Browse files Browse the repository at this point in the history
  • Loading branch information
WanjikuMac committed Oct 26, 2023
1 parent 9aa11ed commit 968d747
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/alpha-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: Alpha Deploy

on:
push:
branches:
- fix/deployment_alpha_prod
# tags:
# - v*-alpha
tags:
- v*-alpha

env:
PROJECT_ID: ${{ secrets.GCE_PROJECT }}
Expand Down Expand Up @@ -46,17 +44,17 @@ jobs:
- name: Build
run: |
echo '${{ secrets.RELEASES_SECRETS }}' >> config/releases.exs
docker build --tag "gcr.io/duncan-openc2-plugfest/twinklyhaha:v0.2.3" .
docker build --tag "gcr.io/duncan-openc2-plugfest/twinklyhaha:${GITHUB_REF_NAME}" .
# Push the Docker image to Google Container Registry
- name: Publish
run: |-
docker push "gcr.io/duncan-openc2-plugfest/twinklyhaha:${GITHUB_REF##*/}"
docker push "gcr.io/duncan-openc2-plugfest/twinklyhaha:${GITHUB_REF_NAME}"
- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v0
with:
service: twinklyhaha-alpha
region: us-east4
image: "gcr.io/duncan-openc2-plugfest/twinklyhaha:${GITHUB_REF##*/}"
image: "gcr.io/duncan-openc2-plugfest/twinklyhaha:${{ github.ref_name }}"
6 changes: 3 additions & 3 deletions .github/workflows/prod-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ jobs:
- name: Build
run: |
echo '${{ secrets.RELEASES_SECRETS }}' >> config/releases.exs
docker build --tag "gcr.io/duncan-openc2-plugfest/twinklyhaha:${GITHUB_REF##*/}" .
docker build --tag "gcr.io/duncan-openc2-plugfest/twinklyhaha:${GITHUB_REF_NAME}" .
# Push the Docker image to Google Container Registry
- name: Publish
run: |-
docker push "gcr.io/duncan-openc2-plugfest/twinklyhaha:${GITHUB_REF##*/}"
docker push "gcr.io/duncan-openc2-plugfest/twinklyhaha:${GITHUB_REF_NAME}"
- name: Deploy
id: deploy
uses: google-github-actions/deploy-cloudrun@v0
with:
service: twinklyhaha
region: us-east4
image: "gcr.io/duncan-openc2-plugfest/twinklyhaha:${GITHUB_REF##*/}"
image: "gcr.io/duncan-openc2-plugfest/twinklyhaha:${{ github.ref_name }}"

0 comments on commit 968d747

Please sign in to comment.