Skip to content

Commit

Permalink
Fix deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchTalmadge authored Nov 11, 2023
1 parent 5953169 commit 92f2a86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- "master"
tags:
- v*
workflow_dispatch:


jobs:
build:
Expand All @@ -24,7 +26,7 @@ jobs:
path: /tmp
- name: "Get Tag Name"
id: get_tag_name
run: echo "TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
run: echo "TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
- name: "Load Docker Images"
id: load_images
run: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ jobs:
uses: actions/download-artifact@v2
with:
path: /tmp
- name: "Get Branch Name"
id: get_branch_name
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
- name: "Load Docker Images"
id: load_images
run: |
TAGS=""
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
for f in $(find /tmp -type f -iname 'docker-image-*.tar' -print); do
ARCH=$(echo ${f} | sed -E 's/.*docker-image-(.*).tar/\1/')
docker load --input ${f}
TAG="mitchtalmadge/amp-dockerized:${BRANCH_NAME}-${ARCH}"
TAG="mitchtalmadge/amp-dockerized:${{ steps.get_branch_name.outputs.BRANCH_NAME }}-${ARCH}"
TAGS="${TAGS} ${TAG}"
docker tag amp-dockerized:latest ${TAG}
done
Expand All @@ -49,7 +51,6 @@ jobs:
run: docker image push --all-tags mitchtalmadge/amp-dockerized
- name: "Deploy Multi-Arch Manifest"
run: |
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
MANIFEST="mitchtalmadge/amp-dockerized:${BRANCH_NAME}"
MANIFEST="mitchtalmadge/amp-dockerized:${{ steps.get_branch_name.outputs.BRANCH_NAME }}"
docker manifest create ${MANIFEST} ${{ steps.load_images.outputs.TAGS }}
docker manifest push ${MANIFEST}

0 comments on commit 92f2a86

Please sign in to comment.