@@ -42,37 +42,33 @@ jobs:
4242
4343 - name : Set up QEMU
4444 uses : docker/setup-qemu-action@v1
45-
45+
4646 - name : Set up Docker Buildx
4747 uses : docker/setup-buildx-action@v1
48-
49- - name : Login to GitHub Container Registry
50- uses : docker/login-action@v1
51- with :
52- registry : docker.pkg.github.com
53- username : ${{ github.actor }}
54- password : ${{ secrets.GITHUB_TOKEN }}
55-
48+
49+ - name : Log into registry
50+ run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
51+
5652 - name : Prepare image metadata
5753 id : prep
5854 run : |
5955 IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
60-
56+
6157 # Change all uppercase to lowercase
6258 IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
63-
59+
6460 # Strip git ref prefix from version
6561 VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
66-
62+
6763 # Strip "v" prefix from tag name
6864 [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
69-
65+
7066 # Use Docker `latest` tag convention
7167 [ "$VERSION" == "master" ] && VERSION=latest
72-
68+
7369 echo "::set-output name=image::$IMAGE_ID"
7470 echo "::set-output name=version::$VERSION"
75-
71+
7672 - name : Build and push
7773 uses : docker/build-push-action@v2
7874 with :
0 commit comments