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

fix(tagging): only tag dev on dev branch and latest for master/git ta… #6

Merged
merged 2 commits into from
Aug 10, 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
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
Loading