mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
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:
parent
93ae5043cc
commit
3e14de158b
9
.github/workflows/docker-publish.yml
vendored
9
.github/workflows/docker-publish.yml
vendored
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user