Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
20c9fc91
Unverified
Commit
20c9fc91
authored
Dec 13, 2020
by
Edward Thomson
Committed by
GitHub
Dec 13, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5736 from libgit2/ethomson/v1.1_ci
ci: use GITHUB_ENV instead of set-env for v1.1 branch
parents
7f4fa178
a9e2510a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
azure-pipelines/getcontainer.sh
+7
-7
No files found.
azure-pipelines/getcontainer.sh
View file @
20c9fc91
...
...
@@ -18,18 +18,18 @@ fi
DOCKER_CONTAINER
=
"
${
GITHUB_REPOSITORY
}
/
$(
basename
${
DOCKERFILE_PATH
})
"
DOCKER_REGISTRY_CONTAINER
=
"
${
DOCKER_REGISTRY
}
/
${
DOCKER_CONTAINER
}
"
echo
"
::set-env name=docker-container::
${
DOCKER_CONTAINER
}
"
echo
"
::set-env name=docker-registry-container::
${
DOCKER_REGISTRY_CONTAINER
}
"
echo
"
docker-container=
${
DOCKER_CONTAINER
}
"
>>
$GITHUB_ENV
echo
"
docker-registry-container=
${
DOCKER_REGISTRY_CONTAINER
}
"
>>
$GITHUB_ENV
# Identify the last git commit that touched the Dockerfiles
# Use this as a hash to identify the resulting docker containers
DOCKER_SHA
=
$(
git log
-1
--pretty
=
format:
"%h"
--
"
${
DOCKERFILE_PATH
}
"
)
echo
"
::set-env name=docker-sha::
${
DOCKER_SHA
}
"
echo
"
docker-sha=
${
DOCKER_SHA
}
"
>>
$GITHUB_ENV
DOCKER_REGISTRY_CONTAINER_SHA
=
"
${
DOCKER_REGISTRY_CONTAINER
}
:
${
DOCKER_SHA
}
"
echo
"
::set-env name=docker-registry-container-sha::
${
DOCKER_REGISTRY_CONTAINER_SHA
}
"
echo
"
::set-env name=docker-registry-container-latest::
${
DOCKER_REGISTRY_CONTAINER
}
:latest"
echo
"
docker-registry-container-sha=
${
DOCKER_REGISTRY_CONTAINER_SHA
}
"
>>
$GITHUB_ENV
echo
"
docker-registry-container-latest=
${
DOCKER_REGISTRY_CONTAINER
}
:latest"
>>
$GITHUB_ENV
exists
=
"true"
docker login https://
${
DOCKER_REGISTRY
}
-u
${
GITHUB_ACTOR
}
-p
${
GITHUB_TOKEN
}
||
exists
=
"false"
...
...
@@ -39,7 +39,7 @@ if [ "${exists}" != "false" ]; then
fi
if
[
"
${
exists
}
"
=
"true"
]
;
then
echo
"
::set-env name=docker-container-exists::true"
echo
"
docker-container-exists=true"
>>
$GITHUB_ENV
else
echo
"
::set-env name=docker-container-exists::false"
echo
"
docker-container-exists=false"
>>
$GITHUB_ENV
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment