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

use github container registry instead of gcr.io for releases #1422

Merged
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
5 changes: 2 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ jobs:

- name: Build Spark-Operator Docker Image
run: |
DOCKER_TAG=$(cat charts/spark-operator-chart/Chart.yaml | grep "appVersion: .*" | cut -c13-)
docker build -t gcr.io/spark-operator/spark-operator:${DOCKER_TAG} .
docker build -t gcr.io/spark-operator/spark-operator:latest .

- name: Check changes in resources used in docker file
run: |
Expand All @@ -97,7 +96,7 @@ jobs:
fi
fi
done

build-helm-chart:
runs-on: ubuntu-latest
steps:
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,31 @@ jobs:
with:
version: v3.7.1

- uses: actions/setup-python@v2
with:
python-version: 3.10

# TODO: Maintainer of repository to follow:
# https://github.com/docker/login-action#google-container-registry-gcr to add credentials so
# we can push from github actions
# - name: log in to container registry
# - name: log in to google container registry
# uses: docker/login-action@v1
# with:
# registry: gcr.io
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to Packages Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Release Spark-Operator Docker Image
- name: Release Spark-Operator Docker Image to github container registry
run: |
DOCKER_TAG=$(cat charts/spark-operator-chart/Chart.yaml | grep "appVersion: .*" | cut -c13-)
docker build -t gcr.io/spark-operator/spark-operator:${DOCKER_TAG} .
echo "Ideally, we'd release the docker container at this point, but the maintainer of this repo needs to approve..."
if ! docker pull docker pull gcr.io/spark-operator/spark-operator:${DOCKER_TAG}; then
echo "docker push gcr.io/spark-operator/spark-operator:${DOCKER_TAG}"
docker tag gcr.io/spark-operator/spark-operator:${DOCKER_TAG} ghcr.io/googlecloudplatform/spark-operator:${DOCKER_TAG}
if ! docker pull ghcr.io/googlecloudplatform/spark-operator:${DOCKER_TAG}; then
docker push ghcr.io/googlecloudplatform/spark-operator:${DOCKER_TAG}
git tag $DOCKER_TAG
git push origin $DOCKER_TAG
fi
Expand Down