Update main.yml
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index bc62194..c8a9f44 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -20,6 +20,7 @@ jobs:
- { name: bionic, base: 'ubuntu:bionic' }
env:
docker-config-path: azure-pipelines/docker
+ docker-registry: docker.pkg.github.com
name: Build docker image
runs-on: ubuntu-latest
steps:
@@ -30,7 +31,6 @@ jobs:
- name: Calculate image label
run: |
echo "::set-env name=docker-container::${{ github.repository }}/${{ matrix.container.name }}"
- echo "::set-env name=docker-container-url::docker.pkg.github.com/${{ env.docker-container }}"
echo "::set-env name=docker-sha-tag::test3-$(git log -1 --pretty=format:"%h" -- ${{ env.docker-config-path }})"
- name: Download existing image
run: |
@@ -40,8 +40,8 @@ jobs:
docker pull ${{ env.docker-container-url }}:${{ env.docker-sha-tag }} || echo "::set-env name=docker-container-exists::false"
- name: Build and publish image
run: |
- docker build -t ${{ env.docker-container-url }}:${{ env.docker-sha-tag }} --build-arg BASE=${{ matrix.container.base }} -f ${{ matrix.container.name }} .
- docker tag ${{ env.docker-container-url }}:${{ env.docker-sha-tag }} ${{ env.docker-container-url }}:latest
+ docker build -t ${{ env.docker-registry }}/${{ env.docker-container }}:${{ env.docker-sha-tag }} --build-arg BASE=${{ matrix.container.base }} -f ${{ matrix.container.name }} .
+ docker tag ${{ env.docker-registry }}/${{ env.docker-container }}:${{ env.docker-sha-tag }} ${{ env.docker-registry }}/${{ env.docker-container }}:latest
# docker push ${{ docker.container-url }}:${{ env.docker-sha-tag }}
# docker push ${{ docker.container-url }}:latest
working-directory: ${{ env.docker-config-path }}