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

GitHub workflow to push image after merge #39

Merged
Merged
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
73 changes: 26 additions & 47 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,30 @@ env:


jobs:
image_build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-go@main
with:
go-version: 1.18
- name: Login to Quay
uses: docker/[email protected]
with:
registry: quay.io/sustainable_computing_io
username: ${{ secrets.BOT_NAME }}
password: ${{ secrets.BOT_TOKEN }}


# push-image:
# name: Push operator container image to quay.io/sustainable_computing_io/kepler-operator
# needs: [build-operator,e2e]
# runs-on: ubuntu-latest
# steps:

# - name: Login to quay.io/sustainable_computing_io/
# uses: docker/login-action@v1
# if: ${{ (github.repository_owner == 'sustainable-computing-io') && (github.ref == 'refs/heads/v1alpha1') }}

# with:
# registry: quay.io/sustainable_computing_io
# username: ${{ secrets.BOT_NAME }}
# password: ${{ secrets.BOT_TOKEN }}

# - name: Download image bundle
# uses: actions/download-artifact@v3
# with:
# name: kepler-operator

# - name: Test artifact download
# run : |
# ls -R
# pwd
# - name: Push to quay
# if: ${{ (github.repository_owner == 'sustainable-computing-io') && (github.ref == 'refs/heads/v1alpha1') }}
# run: |
# docker load -i image.tar
# docker inspect ${OPERATOR_IMAGE}
# docker tag ${OPERATOR_IMAGE} ${OPERATOR_IMAGE}:latest
# docker push ${OPERATOR_IMAGE}:latest
push-image:
name: Push operator container image to quay.io/sustainable_computing_io/kepler-operator
runs-on: ubuntu-latest
steps:

- name: Checkout source
uses: actions/checkout@v3

- uses: actions/setup-go@main
with:
go-version: 1.19

- name: Login to Quay
uses: docker/login-action@v1
with:
registry: quay.io/sustainable_computing_io
username: ${{ secrets.BOT_NAME }}
password: ${{ secrets.BOT_TOKEN }}

- name: make container
run: make docker-build IMG=${OPERATOR_IMAGE}:latest


- name: Push to quay
run: docker push ${OPERATOR_IMAGE}:latest