Skip to content

Commit

Permalink
Merge pull request #6 from nofusscomputing/4-tagging
Browse files Browse the repository at this point in the history
fix(tagging): only tag dev on dev branch and latest for master/git ta…
  • Loading branch information
jon-nfc authored Aug 10, 2024
2 parents 1519dfd + 6c0e98f commit 5d960c3
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,21 @@ jobs:
- name: Create Image Tag 'latest'
if: ${{ inputs.DOCKER_TAG_IMAGE_TAG_LATEST }}
shell: bash
run: |
TAG_NAME=dev;
if [ "${{ github.ref_name }}" == 'master' ]; then
TAG_NAME=latest;
fi
echo "[Debug] TAG_NAME=${TAG_NAME}";
docker buildx imagetools create ${{ inputs.DOCKER_BUILD_REGISTRY }}/${{ inputs.DOCKER_BUILD_IMAGE_NAME }}:${{ inputs.DOCKER_TAG_IMAGE_TAG_SOURCE }} \
--tag ${{ inputs.DOCKER_BUILD_REGISTRY }}/${{ inputs.DOCKER_BUILD_IMAGE_NAME }}:latest;
--tag ${{ inputs.DOCKER_BUILD_REGISTRY }}/${{ inputs.DOCKER_BUILD_IMAGE_NAME }}:${TAG_NAME};
Expand Down Expand Up @@ -742,9 +754,23 @@ jobs:

- name: Tag Image with GIT 'latest'
if: ${{ inputs.DOCKER_TAG_IMAGE_TAG_LATEST }}
id: tag-image
shell: bash
run: |
TAG_NAME=dev;
if [ "${{ github.ref_name }}" == 'master' ]; then
TAG_NAME=latest;
fi
echo "[Debug] TAG_NAME=${TAG_NAME}";
echo "mutable_tag_name=${TAG_NAME}" > $GITHUB_OUTPUT
docker buildx imagetools create ${{ inputs.DOCKER_BUILD_REGISTRY }}/${{ inputs.DOCKER_BUILD_IMAGE_NAME }}:${{ inputs.DOCKER_TAG_IMAGE_TAG_SOURCE }} \
--tag ${{ inputs.DOCKER_PUBLISH_REGISTRY }}/${{ inputs.DOCKER_PUBLISH_IMAGE_NAME }}:latest;
--tag ${{ inputs.DOCKER_PUBLISH_REGISTRY }}/${{ inputs.DOCKER_PUBLISH_IMAGE_NAME }}:${TAG_NAME};
- name: Append GH Release Body
Expand All @@ -759,7 +785,7 @@ jobs:
The following images were built and published:
- `docker pull ${{ inputs.DOCKER_PUBLISH_REGISTRY }}/${{ inputs.DOCKER_PUBLISH_IMAGE_NAME }}:latest`
- `docker pull ${{ inputs.DOCKER_PUBLISH_REGISTRY }}/${{ inputs.DOCKER_PUBLISH_IMAGE_NAME }}:${{ steps.tag-image.outputs.mutable_tag_name }}`
- `docker pull ${{ inputs.DOCKER_PUBLISH_REGISTRY }}/${{ inputs.DOCKER_PUBLISH_IMAGE_NAME }}:${{ inputs.DOCKER_TAG_IMAGE_TAG_SOURCE }}`
- `docker pull ${{ inputs.DOCKER_PUBLISH_REGISTRY }}/${{ inputs.DOCKER_PUBLISH_IMAGE_NAME }}:${{ github.ref_name }}`
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

---

name: Pull Requests


on:
pull_request: {}


jobs:

pull-requests:
name: Pull Request
uses: nofusscomputing/action_pull_requests/.github/workflows/pull-requests.yaml@development

0 comments on commit 5d960c3

Please sign in to comment.