Skip to content

Commit

Permalink
Push released images to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh committed Oct 27, 2021
1 parent 4fcc91d commit 4d003e8
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,22 @@ jobs:
release:
if: ${{ github.repository == 'shipwright-io/build' }}
runs-on: ubuntu-latest
env:
IMAGE_HOST: ghcr.io
IMAGE_NAMESPACE: ${{ github.repository }}
TAG: ${{ github.event.inputs.release }}

steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history, needed for release note generation.
- uses: actions/setup-go@v2
with:
fetch-depth: 0
go-version: 1.16.x

# Install tools
- uses: imjasonh/setup-ko@20b7695b536c640edfafdd378d96c760460f29d6

- name: Build Release Changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -29,6 +40,7 @@ jobs:
export GITHUB_TOKEN
export PREVIOUS_TAG
"${GITHUB_WORKSPACE}/.github/draft_release_notes.sh"
- name: Draft release
id: draft_release
uses: actions/create-release@v1
Expand All @@ -41,21 +53,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x

- name: Install Ko
uses: imjasonh/setup-ko@20b7695b536c640edfafdd378d96c760460f29d6

- name: Generate and upload release.yaml
env:
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
IMAGE_HOST: quay.io
IMAGE: shipwright/shipwright-operator
TAG: ${{ github.event.inputs.release }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
REGISTRY_USERNAME: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make release
Expand Down

0 comments on commit 4d003e8

Please sign in to comment.