mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00: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
1 changed files with 5 additions and 4 deletions
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 }
|
with: { name: '${{ matrix.arch }}', path: target/release }
|
||||||
- name: Build and publish exact version
|
- name: Build and publish exact version
|
||||||
run: |-
|
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 NU_BINS=target/release/$( [ ${{ matrix.plugin }} = true ] && echo nu* || echo nu )
|
||||||
export PATCH=$([ ${{ matrix.use-patch }} = true ] && echo .${{ matrix.tag }} || echo '')
|
export PATCH=$([ ${{ matrix.use-patch }} = true ] && echo .${{ matrix.tag }} || echo '')
|
||||||
chmod +x $NU_BINS
|
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 build
|
||||||
docker-compose --file docker/docker-compose.package.yml push # exact version
|
docker-compose --file docker/docker-compose.package.yml push # exact version
|
||||||
env:
|
env:
|
||||||
BASE_IMAGE: ${{ matrix.base-image }}
|
BASE_IMAGE: ${{ matrix.base-image }}
|
||||||
# REGISTRY: docker.pkg.github.com/${{ github.repository }} #TODO: waiting support for GITHUB_TOKEN for docker.pkg.github.com
|
# 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 }}
|
REGISTRY: quay.io/${{ github.actor }}
|
||||||
|
|
||||||
#region semantics tagging
|
#region semantics tagging
|
||||||
- name: Retag and push without suffixing version
|
- name: Retag and push with suffixed version
|
||||||
run: |-
|
run: |-
|
||||||
VERSION=${GITHUB_REF##*/}
|
VERSION=${GITHUB_REF##*/}
|
||||||
|
|
||||||
|
@ -86,7 +87,7 @@ jobs:
|
||||||
latest_patch=${VERSION%.*}-${{ matrix.tag }}
|
latest_patch=${VERSION%.*}-${{ matrix.tag }}
|
||||||
exact_version=${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
|
for tag in ${tags[@]}; do
|
||||||
docker tag ${REGISTRY,,}/nu:${VERSION}-${{ matrix.tag }} ${REGISTRY,,}/nu:${tag}
|
docker tag ${REGISTRY,,}/nu:${VERSION}-${{ matrix.tag }} ${REGISTRY,,}/nu:${tag}
|
||||||
|
|
Loading…
Reference in a new issue