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

Refactor: Revise to push images on tag pushes #8

Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
docker info
docker version
- name: Login to docker registry
if: startsWith(github.ref, 'refs/heads/build/') && github.repository == 'startersclan/docker-steamcmd'
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'startersclan/docker-steamcmd'
joeltimothyoh marked this conversation as resolved.
Show resolved Hide resolved
env:
DOCKERHUB_REGISTRY_USER: startersclan
DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
Expand All @@ -71,7 +71,7 @@ jobs:
echo "BUILD_CONTEXT: $BUILD_CONTEXT"
echo "BASE_IMAGE: ${BASE_REGISTRY_NAMESPACE}/${BASE_IMAGE_NAME}:${BASE_TAG_FULL}"
echo "BUILD_IMAGE: ${BUILD_REGISTRY_NAMESPACE}/${BUILD_IMAGE_NAME}:${BUILD_TAG_FULL}"
TAG_TOOL_ARCHIVE=$(echo "${GITHUB_REF}" | sed -rn 's/^refs\/heads\/build\/(.*)/\1/p')
TAG_TOOL_ARCHIVE=$(echo "${GITHUB_REF}" | sed -rn 's/^refs\/tags\/(.*)/\1/p')
echo "TAG_TOOL_ARCHIVE: $TAG_TOOL_ARCHIVE"
date
time docker pull "${BUILD_REGISTRY_NAMESPACE}/${BUILD_IMAGE_NAME}:${BUILD_TAG_FULL}" || true
Expand All @@ -93,7 +93,7 @@ jobs:
- name: Test image
run: docker run -t --rm "${BUILD_REGISTRY_NAMESPACE}/${BUILD_IMAGE_NAME}:${BUILD_TAG_FULL}" /bin/bash -c "printenv && echo && ls -al && echo && exec steamcmd.sh +login anonymous +quit"
- name: Push image
if: startsWith(github.ref, 'refs/heads/build/') && github.repository == 'startersclan/docker-steamcmd'
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'startersclan/docker-steamcmd'
joeltimothyoh marked this conversation as resolved.
Show resolved Hide resolved
run: docker push -a "${BUILD_REGISTRY_NAMESPACE}/${BUILD_IMAGE_NAME}"
- name: Clean-up
if: always()
Expand Down