Skip to content

Commit e51002a

Browse files
authored
Update main.yml
1 parent 8f48cbf commit e51002a

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

.github/workflows/main.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,44 +15,44 @@ jobs:
1515
# to download the image tagged with that sha. If it does not exist, we'll do a docker
1616
# build and push the image up to GitHub Packages for the actual CI/CD runs. We tag
1717
# with both the sha and "latest" so that the subsequent runs need not know the sha.
18-
build_containers:
19-
strategy:
20-
matrix:
21-
container:
22-
- { name: xenial, base: 'ubuntu:xenial' }
23-
- { name: bionic, base: 'ubuntu:bionic' }
24-
env:
25-
docker-config-path: azure-pipelines/docker
26-
docker-registry: docker.pkg.github.com
27-
name: Create docker image
28-
runs-on: ubuntu-latest
29-
steps:
30-
- name: Check out repository
31-
uses: actions/checkout@v2
32-
with:
33-
fetch-depth: 0
34-
- name: Calculate image label
35-
run: |
36-
echo "::set-env name=docker-container::${{ github.repository }}/${{ matrix.container.name }}"
37-
echo "::set-env name=docker-sha-tag::test4-$(git log -1 --pretty=format:"%h" -- ${{ env.docker-config-path }})"
38-
- name: Download existing image
39-
run: |
40-
docker login https://${{ env.docker-registry }} -u ${{ github.actor }} -p ${{ github.token }}
41-
42-
echo "::set-env name=docker-container-exists::true"
43-
docker pull ${{ env.docker-registry }}/${{ env.docker-container }}:${{ env.docker-sha-tag }} || echo "::set-env name=docker-container-exists::false"
44-
- name: Build and publish image
45-
run: |
46-
docker build -t ${{ env.docker-registry }}/${{ env.docker-container }}:${{ env.docker-sha-tag }} --build-arg BASE=${{ matrix.container.base }} -f ${{ matrix.container.name }} .
47-
docker tag ${{ env.docker-registry }}/${{ env.docker-container }}:${{ env.docker-sha-tag }} ${{ env.docker-registry }}/${{ env.docker-container }}:latest
48-
docker push ${{ env.docker-registry }}/${{ env.docker-container }}:${{ env.docker-sha-tag }}
49-
docker push ${{ env.docker-registry }}/${{ env.docker-container }}:latest
50-
working-directory: ${{ env.docker-config-path }}
51-
if: env.docker-container-exists != 'true'
18+
# build_containers:
19+
# strategy:
20+
# matrix:
21+
# container:
22+
# - { name: xenial, base: 'ubuntu:xenial' }
23+
# - { name: bionic, base: 'ubuntu:bionic' }
24+
# env:
25+
# docker-config-path: azure-pipelines/docker
26+
# docker-registry: docker.pkg.github.com
27+
# name: Create docker image
28+
# runs-on: ubuntu-latest
29+
# steps:
30+
# - name: Check out repository
31+
# uses: actions/checkout@v2
32+
# with:
33+
# fetch-depth: 0
34+
# - name: Calculate image label
35+
# run: |
36+
# echo "::set-env name=docker-container::${{ github.repository }}/${{ matrix.container.name }}"
37+
# echo "::set-env name=docker-sha-tag::test4-$(git log -1 --pretty=format:"%h" -- ${{ env.docker-config-path }})"
38+
# - name: Download existing image
39+
# run: |
40+
# docker login https://${{ env.docker-registry }} -u ${{ github.actor }} -p ${{ github.token }}
41+
#
42+
# echo "::set-env name=docker-container-exists::true"
43+
# docker pull ${{ env.docker-registry }}/${{ env.docker-container }}:${{ env.docker-sha-tag }} || echo "::set-env name=docker-container-exists::false"
44+
# - name: Build and publish image
45+
# run: |
46+
# docker build -t ${{ env.docker-registry }}/${{ env.docker-container }}:${{ env.docker-sha-tag }} --build-arg BASE=${{ matrix.container.base }} -f ${{ matrix.container.name }} .
47+
# docker tag ${{ env.docker-registry }}/${{ env.docker-container }}:${{ env.docker-sha-tag }} ${{ env.docker-registry }}/${{ env.docker-container }}:latest
48+
# docker push ${{ env.docker-registry }}/${{ env.docker-container }}:${{ env.docker-sha-tag }}
49+
# docker push ${{ env.docker-registry }}/${{ env.docker-container }}:latest
50+
# working-directory: ${{ env.docker-config-path }}
51+
# if: env.docker-container-exists != 'true'
5252

5353
# Run our CI/CD builds.
5454
build:
55-
needs: [build_containers]
55+
# needs: [build_containers]
5656
strategy:
5757
matrix:
5858
platform:
@@ -102,7 +102,7 @@ jobs:
102102
docker_container="${{ github.repository }}/${{ matrix.platform.image }}:latest"
103103
docker login https://${{ env.foo }} -u ${{ github.actor }} -p ${{ github.token }}
104104
docker pull ${{ env.foo }}/${docker_container}
105-
docker run -v /tmp/__home__:/home/libgit2 -v $(pwd):/home/libgit2/source -w /home/libgit2/source -e CC -e CMAKE_GENERATOR -e CMAKE_OPTIONS -e PKG_CONFIG_PATH -e SKIP_SSH_TESTS -e SKIP_NEGOTIATE_TESTS ${{ env.foo }}/${docker_container} "mkdir build && cd build && ../azure-pipelines/build.sh && ../azure-pipelines/test.sh"
105+
docker run -v /tmp/__home__:/home/libgit2 -v $(pwd):/home/libgit2/source -w /home/libgit2/source -e CC -e CMAKE_GENERATOR -e CMAKE_OPTIONS -e PKG_CONFIG_PATH -e SKIP_SSH_TESTS -e SKIP_NEGOTIATE_TESTS ${{ env.foo }}/${docker_container} "pwd && ls -Flas && mkdir build && cd build && ../azure-pipelines/build.sh && ../azure-pipelines/test.sh"
106106
else
107107
mkdir build && cd build
108108
../azure-pipelines/build.sh

0 commit comments

Comments
 (0)