fix(ci): can't push to quay.io (#1)

* ci(github): lowercase ${{ github.actor }}

* ci(github): fix robot username

* fix(ci): fix tag name on suffixed version
This commit is contained in:
Fahmi Akbar Wildana 2019-10-09 09:58:49 +07:00 committed by GitHub
parent 93ae5043cc
commit 3e14de158b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,21 +63,22 @@ jobs:
with: { name: '${{ matrix.arch }}', path: target/release }
- name: Build and publish exact version
run: |-
REGISTRY=${REGISTRY,,}; export TAG=${GITHUB_REF##*/}-${{ matrix.tag }};
REGISTRY=${REGISTRY,,}; export TAG=${GITHUB_REF##*/}-${{ matrix.tag }}
export NU_BINS=target/release/$( [ ${{ matrix.plugin }} = true ] && echo nu* || echo nu )
export PATCH=$([ ${{ matrix.use-patch }} = true ] && echo .${{ matrix.tag }} || echo '')
chmod +x $NU_BINS
echo ${{ secrets.DOCKER_REGISTRY }} | docker login ${REGISTRY%/*} -u ${{ github.actor }} --password-stdin
echo ${{ secrets.DOCKER_REGISTRY }} | docker login ${REGISTRY%/*} -u ${USER,,} --password-stdin
docker-compose --file docker/docker-compose.package.yml build
docker-compose --file docker/docker-compose.package.yml push # exact version
env:
BASE_IMAGE: ${{ matrix.base-image }}
# REGISTRY: docker.pkg.github.com/${{ github.repository }} #TODO: waiting support for GITHUB_TOKEN for docker.pkg.github.com
USER: ${{ github.actor }}+action
REGISTRY: quay.io/${{ github.actor }}
#region semantics tagging
- name: Retag and push without suffixing version
- name: Retag and push with suffixed version
run: |-
VERSION=${GITHUB_REF##*/}
@ -86,7 +87,7 @@ jobs:
latest_patch=${VERSION%.*}-${{ matrix.tag }}
exact_version=${VERSION}-${{ matrix.tag }}
tags=( latest_version latest_feature latest_patch exact_version )
tags=( ${latest_version} ${latest_feature} ${latest_patch} ${exact_version} )
for tag in ${tags[@]}; do
docker tag ${REGISTRY,,}/nu:${VERSION}-${{ matrix.tag }} ${REGISTRY,,}/nu:${tag}