Skip to content

Commit

Permalink
feat: dynamic container naming (#10)
Browse files Browse the repository at this point in the history
* feat: dynamic container naming with override option for container name
  • Loading branch information
mabunixda authored Jul 20, 2022
1 parent 9f48b6a commit d75366d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
changelog-file: CHANGELOG.md

- name: Prepare Dockerhub
- name: Prepare tagging
id: prep
run: |
HUB_IMAGE=infralovers/packer-builder
QUAY_IMAGE=quay.io/infralovers/packer-builder
VERSION=latest
IMAGE_NAME=$(basename ${{ github.repository }})
IMAGE_REPO=${{ github.repository_owner }}
if [[ -n "${{ secrets.IMAGE_NAME }}" ]]; then
IMAGE_NAME="${{ secrets.IMAGE_NAME }}"
fi
if [[ -n "${{ secrets.IMAGE_REPO }}" ]]; then
IMAGE_REPO="${{ secrets.IMAGE_REPO }}"
fi
HUB_IMAGE="$IMAGE_REPO/$IMAGE_NAME"
QUAY_IMAGE="quay.io/$IMAGE_REPO/$IMAGE_NAME"
VERSION=dev
if [[ '${{ steps.semrel.outputs.version }}' != '' ]]; then
VERSION=${{ steps.semrel.outputs.version }}
fi
Expand Down

0 comments on commit d75366d

Please sign in to comment.