Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change push to use Docker Hub. #31

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/buildpack-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
buildpack-deps:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REPOSITORY: docker.pkg.github.com/${{ github.repository }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKER_REPOSITORY: aarlt/solidity-buildpack-deps
IMAGE_NAME: buildpack-deps

runs-on: ubuntu-latest
Expand All @@ -31,9 +32,9 @@ jobs:

- name: Upgrade ${{ env.IMAGE_NAME }}-${{ matrix.image_variant }}
run: |
echo "${GITHUB_TOKEN}" | docker login docker.pkg.github.com -u "${GITHUB_ACTOR}" --password-stdin
echo ${DOCKERHUB_TOKEN} | docker login -u ${GITHUB_ACTOR} --password-stdin
scripts/ci/docker_upgrade.sh ${{ env.IMAGE_NAME }} ${{ matrix.image_variant }} ${{ env.DOCKER_REPOSITORY }}
docker logout docker.pkg.github.com
docker logout

- name: comment PR
if: "env.DOCKER_IMAGE"
Expand Down
13 changes: 5 additions & 8 deletions scripts/ci/docker_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,12 @@ docker run --rm --volume "${PWD}:/root/project" "${IMAGE_NAME}" "/root/project/s
echo "-- push_docker"

VERSION=$(docker inspect --format='{{.Config.Labels.version}}' "${IMAGE_NAME}")
DOCKER_IMAGE_ID="${DOCKER_REPOSITORY}/${IMAGE_NAME}-${IMAGE_VARIANT}"
DOCKER_IMAGE_ID="${DOCKER_REPOSITORY}:${IMAGE_VARIANT}"

docker tag "${IMAGE_NAME}" "${DOCKER_IMAGE_ID}:${VERSION}"
docker push "${DOCKER_IMAGE_ID}:${VERSION}"
docker tag "${IMAGE_NAME}" "${DOCKER_IMAGE_ID}-${VERSION}"
docker push "${DOCKER_IMAGE_ID}-${VERSION}"

REPO_DIGEST=$(docker inspect --format='{{.RepoDigests}}' "${DOCKER_IMAGE_ID}:${VERSION}")
REPO_DIGEST=$(docker inspect --format='{{.RepoDigests}}' "${DOCKER_IMAGE_ID}-${VERSION}")

docker tag "${IMAGE_NAME}" "${DOCKER_IMAGE_ID}:latest"
docker push "${DOCKER_IMAGE_ID}:latest"

echo "::set-env name=DOCKER_IMAGE::${DOCKER_IMAGE_ID}:${VERSION}"
echo "::set-env name=DOCKER_IMAGE::${DOCKER_IMAGE_ID}-${VERSION}"
echo "::set-env name=DOCKER_REPO_DIGEST::${REPO_DIGEST}"
2 changes: 1 addition & 1 deletion scripts/docker/buildpack-deps/Dockerfile.emscripten
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# make version=1.39.15 build
#
FROM emscripten/emsdk:1.39.15 AS base
LABEL version="0"
LABEL version="1"

ADD emscripten.jam /usr/src
RUN set -ex; \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# (c) 2016-2019 solidity contributors.
#------------------------------------------------------------------------------
FROM gcr.io/oss-fuzz-base/base-clang as base
LABEL version="0"
LABEL version="1"

ARG DEBIAN_FRONTEND=noninteractive

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/buildpack-deps/Dockerfile.ubuntu1804
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# (c) 2016-2019 solidity contributors.
#------------------------------------------------------------------------------
FROM buildpack-deps:bionic AS base
LABEL version="0"
LABEL version="1"

ARG DEBIAN_FRONTEND=noninteractive

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/buildpack-deps/Dockerfile.ubuntu2004
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# (c) 2016-2019 solidity contributors.
#------------------------------------------------------------------------------
FROM buildpack-deps:focal AS base
LABEL version="0"
LABEL version="1"

ARG DEBIAN_FRONTEND=noninteractive

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/buildpack-deps/Dockerfile.ubuntu2004.clang
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# (c) 2016-2019 solidity contributors.
#------------------------------------------------------------------------------
FROM buildpack-deps:focal AS base
LABEL version="0"
LABEL version="1"

ARG DEBIAN_FRONTEND=noninteractive

Expand Down