-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update bicep to push to ghcr * update tagged version * test latest * test latest * update image src * update image src * test release version * update on push * nit * testing * testing * testing * testing * revert * just testing * revert * change directory * update upload path * updating if condition
- Loading branch information
Showing
1 changed file
with
29 additions
and
4 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 |
---|---|---|
|
@@ -16,6 +16,14 @@ env: | |
# disable telemetry (reduces dotnet tool output in logs) | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
RELEASE_PATH: ./release | ||
# ORAS (OCI Registry As Storage) CLI version | ||
ORAS_VERSION: 1.1.0 | ||
# GitHub Actor for pushing images to GHCR | ||
GHCR_ACTOR: rad-ci-bot | ||
# Container registry url for GitHub container registry. | ||
CONTAINER_REGISTRY: 'ghcr.io/radius-project/radius' | ||
# URL to get source code for building the image | ||
IMAGE_SRC: https://github.com/radius-project/bicep | ||
|
||
jobs: | ||
build: | ||
|
@@ -244,10 +252,9 @@ jobs: | |
--title "Radius Bicep v${{ env.REL_VERSION }}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_RAD_CI_BOT_PAT }} | ||
|
||
publish_blob: | ||
publish_ghcr: | ||
if: ${{ github.event_name == 'push' }} | ||
name: Publish to Azure Blob Storage | ||
name: Publish to GHCR | ||
needs: ["build", "vscode-bicep-build"] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -285,6 +292,24 @@ jobs: | |
- name: Display artifacts | ||
run: ls -R | ||
working-directory: ./artifacts | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ env.GHCR_ACTOR }} | ||
password: ${{ secrets.GH_RAD_CI_BOT_PAT }} | ||
|
||
- uses: oras-project/setup-oras@v1 | ||
with: | ||
version: ${{ env.ORAS_VERSION }} | ||
- run: oras version | ||
- name: Push rad bicep binaries to GHCR (${{ matrix.runtime.name }}) | ||
run: | | ||
cd ./artifacts/bicep/${{ matrix.runtime.name }} && oras push --annotation "org.opencontainers.image.source=${{ env.IMAGE_SRC }}" ${{ env.CONTAINER_REGISTRY }}/bicep/rad-bicep/${{ matrix.runtime.name }}:${{ env.UPDATE_RELEASE == 'true' && env.REL_VERSION || 'latest' }} ./rad-bicep${{ matrix.runtime.extension }} | ||
- name: Check uploaded | ||
run: curl --fail ${{ env.CONTAINER_REGISTRY }}/bicep/rad-bicep/${{ matrix.runtime.name }}:latest -v > out | ||
|
||
# TODO: remove upload to blob storage once binaries are fully moved to GHCR | ||
- uses: bacongobbler/[email protected] | ||
name: Upload rad-bicep (${{ matrix.runtime.name }}) | ||
id: upload-rad-bicep | ||
|
@@ -346,7 +371,7 @@ jobs: | |
delete_artifacts: | ||
name: Delete artifacts | ||
if: success() | ||
needs: [ 'publish_blob' ] | ||
needs: [ 'publish_ghcr' ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Delete release artifacts | ||
|