Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
davema-clan committed Apr 25, 2024
1 parent 8c0be03 commit a793906
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/hello.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,22 @@ jobs:
Deploy_Prod:
runs-on: ubuntu-latest
needs: GetSHA

if: ${{ github.ref_type == 'tag' }}

env:
IMAGE_SHA: ${{ needs.GetSHA.outputs.IMAGE_SHA}}

steps:
- name: Get Tag Name
id: get_tag_name
run: |
TAG_NAME=$(echo $GITHUB_REF | awk -F '/' '{print $NF}')
echo $TAG_NAME
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
- name: get short sha
run: |
IMAGE_SHA=$(echo ${GITHUB_SHA} | cut -c1-7)
echo "IMAGE_SHA=$IMAGE_SHA" >> $GITHUB_ENV
IMAGE_TAG=$(echo $GITHUB_REF | awk -F '/' '{print $NF}')
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV

- name: docker login github repo
- name: docker login github repo and push
run: echo "${SECRETS_GITHUB_TOKEN}" | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin

- name: build image to prod
Expand Down

0 comments on commit a793906

Please sign in to comment.