Skip to content

Commit

Permalink
Merge pull request #39 from husky-parul/test-gh-action
Browse files Browse the repository at this point in the history
GitHub workflow to push image after merge
  • Loading branch information
rootfs authored Jan 23, 2023
2 parents 18805c6 + 5c0968c commit b41d8a2
Showing 1 changed file with 26 additions and 47 deletions.
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


0 comments on commit b41d8a2

Please sign in to comment.