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

Ensure docker tags are valid #5400

Merged
merged 1 commit into from
Dec 13, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Build image
run: |
# remove any `/` characters from the docker tag and replace them with a -
docker_tag="$(echo $GIT_TAG | sed 's/\//-/')"
docker_tag="$(echo $GIT_TAG | sed 's/[^a-zA-Z0-9]/-/g')"
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}" -f modules/apps/callbacks/Dockerfile
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}"
2 changes: 1 addition & 1 deletion .github/workflows/build-simd-image-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
- name: Build image
run: |
# remove any `/` characters from the docker tag and replace them with a -
docker_tag="$(echo $GIT_TAG | sed 's/\//-/')"
docker_tag="$(echo $GIT_TAG | sed 's/[^a-zA-Z0-9]/-/g')"
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}" --build-arg IBC_GO_VERSION=${{ inputs.ibc-go-version }}
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}"
8 changes: 4 additions & 4 deletions .github/workflows/build-wasm-simd-image-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: |
# remove any `/` characters from the docker tag and replace them with a -

run: |
version="$(scripts/get-libwasm-version.py --get-version)"
checksum="$(scripts/get-libwasm-version.py --get-checksum)"

docker_tag="$(echo $GIT_TAG | sed 's/\//-/')"
# remove all `/` or `+` characters from the docker tag and replace them with a -.
# this ensures the docker tag is valid.
docker_tag="$(echo $GIT_TAG | sed 's/[^a-zA-Z0-9]/-/g')"
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}" -f modules/light-clients/08-wasm/Dockerfile --build-arg LIBWASM_VERSION=${version} --build-arg LIBWASM_CHECKSUM=${checksum}
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}"
4 changes: 2 additions & 2 deletions .github/workflows/e2e-compatibility-unreleased.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: |
docker_tag="$(echo ${{ matrix.release-branch }} | sed 's/\//-/')"
docker_tag="$(echo ${{ matrix.release-branch }} | sed 's/[^a-zA-Z0-9]/-/g')"
# TODO: IBC_GO_VERSION does not yet do anything in the tests but is required.
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:$docker_tag" --build-arg IBC_GO_VERSION=${{ matrix.release-branch }}
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:$docker_tag"
- name: Display image details
run: |
docker_tag="$(echo ${{ matrix.release-branch }} | sed 's/\//-/')"
docker_tag="$(echo ${{ matrix.release-branch }} | sed 's/[^a-zA-Z0-9]/-/g')"
docker inspect "${REGISTRY}/${ORG}/${IMAGE_NAME}:$docker_tag"

transfer-1:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ jobs:
- name: Build image
if: env.RELEASE_BRANCH == matrix.release-branch
run: |
docker_tag="$(echo ${{ matrix.release-branch }} | sed 's/\//-/')"
docker_tag="$(echo ${{ matrix.release-branch }} | sed 's/[^a-zA-Z0-9]/-/g')"
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:$docker_tag" --build-arg IBC_GO_VERSION=${{ inputs.ibc-go-version }}
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:$docker_tag"
- name: Display image details
if: env.RELEASE_BRANCH == matrix.release-branch
run: |
docker_tag="$(echo ${{ matrix.release-branch }} | sed 's/\//-/')"
docker_tag="$(echo ${{ matrix.release-branch }} | sed 's/[^a-zA-Z0-9]/-/g')"
docker inspect "${REGISTRY}/${ORG}/${IMAGE_NAME}:$docker_tag"

transfer-chain-a:
Expand Down
Loading