Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master into Staging #190

Merged
merged 4 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- "master"
tags:
- v*
workflow_dispatch:
inputs:
tag:
required: true
description: e.g. v22

jobs:
build:
Expand All @@ -24,7 +29,12 @@ jobs:
path: /tmp
- name: "Get Tag Name"
id: get_tag_name
run: echo "TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ github.event.inputs.tag }}" != "" ]]; then
echo "TAG_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
else
echo "TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
fi
- 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}
Loading