-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move container images creation to release workflow
This makes it possible to retrigger the entire release process, including all assets creation, by retagging the main branch. Starting with this commit, build triggers on the quay.io/redhat-certification/chart-verifier repo are no longer needed. close #383
- Loading branch information
Showing
5 changed files
with
74 additions
and
42 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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Create container image on main | ||
|
||
# This workflow builds a container image for each commit on the main branch. | ||
# The image is tagged with the (short) commit ID and "main", and pushed to Quay. | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
image: | ||
name: Build and push container images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get commit ID | ||
id: get_commit_id | ||
run: | | ||
# Make the short commit ID available to the following steps. | ||
COMMIT_ID=$(git rev-parse --short HEAD) | ||
echo "commit_id=$COMMIT_ID" | tee -a $GITHUB_OUTPUT | ||
- name: Build container images | ||
id: build_container_images | ||
run: | | ||
# Build podman images locally | ||
make build-image IMAGE_TAG=${{ steps.get_commit_id.outputs.commit_id }} | ||
make build-image IMAGE_TAG=main | ||
- name: Push to quay.io | ||
id: push_to_quay | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: chart-verifier | ||
tags: | | ||
${{ steps.get_commit_id.outputs.commit_id }} | ||
main | ||
registry: quay.io/redhat-certification | ||
username: ${{ secrets.QUAY_BOT_USERNAME }} | ||
password: ${{ secrets.QUAY_BOT_TOKEN }} |
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
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
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