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

Push released images to ghcr.io #917

Merged
merged 1 commit into from
Oct 27, 2021
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
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
imjasonh marked this conversation as resolved.
Show resolved Hide resolved
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