-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from husky-parul/test-gh-action
GitHub workflow to push image after merge
- Loading branch information
Showing
1 changed file
with
26 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|