From 6f5ec60ae66c61c01d0d6ac976ae61a2c619228e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Fri, 20 Sep 2019 16:06:41 +0200 Subject: [PATCH] Fix: Actually push tagged Docker image when GitHub tag is created --- .github/workflows/continuous-integration.yml | 6 +++--- CHANGELOG.md | 11 +++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6a1488d..7b499fb 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -26,15 +26,15 @@ jobs: run: $(which docker) run --interactive --rm --workdir=/normalizer --volume ${GITHUB_WORKSPACE}/.build:/normalizer localheinz/composer-normalize-action:latest --indent-size=1 --indent-style=tab --no-update-lock - name: "Docker Login" - if: "'refs/heads/master' == github.ref || startsWith('refs/tags/', github.ref)" + if: "'refs/heads/master' == github.ref || startsWith(github.ref, 'refs/tags/')" run: echo ${{ secrets.DOCKER_PASSWORD }} | $(which docker) login --password-stdin --username ${{ secrets.DOCKER_USERNAME }} - name: "Push Docker image (latest)" - if: "'refs/heads/master' == github.ref || startsWith('refs/tags/', github.ref)" + if: "'refs/heads/master' == github.ref || startsWith(github.ref, 'refs/tags/')" run: $(which docker) push localheinz/composer-normalize-action:latest - name: "Push Docker image (versioned)" - if: "startsWith('refs/tags/', github.ref)" + if: "startsWith(github.ref, 'refs/tags/')" run: $(which docker) push localheinz/composer-normalize-action:$(bash ./.build/tag-name.sh ${GITHUB_REF}) - name: "Docker Logout" diff --git a/CHANGELOG.md b/CHANGELOG.md index e5a328a..e56573f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Unreleased -For a full diff see [`0.5.0...master`](https://github.com/localheinz/composer-normalize-action/compare/0.5.0...master). +For a full diff see [`0.5.1...master`](https://github.com/localheinz/composer-normalize-action/compare/0.5.1...master). + +## [`0.5.1`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.5.1) + +For a full diff see [`0.5.0...0.5.1`](https://github.com/localheinz/composer-normalize-action/compare/0.5.0...0.5.1). + +### Fixed + +* Flipped arguments passed to `startsWith()` so Docker images are actually tagged when a tag is created on GitHub ([#49](https://github.com/localheinz/composer-normalize-action/pull/49)), by [@localheinz](https://github.com/localheinz) ## [`0.5.0`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.5.0) For a full diff see [`0.4.2...0.5.0`](https://github.com/localheinz/composer-normalize-action/compare/0.4.2...0.5.0). - ### Changed * Started using `php:7.3-cli-alpine` instead of `php:7.3-alpine` as Docker base image ([#39](https://github.com/localheinz/composer-normalize-action/pull/39)), by [@localheinz](https://github.com/localheinz)