Build artifacts #176
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
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
release: | ||
types: [ created ] | ||
name: Build artifacts | ||
jobs: | ||
upload-release: | ||
if: ${{ github.event_name == 'release' }} | ||
name: Upload nginx configuration artifacts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: RDXWorks-actions/checkout@main | ||
- name: Generate artifacts | ||
run: | | ||
bash generate_artifact.sh | ||
- name: Upload Full Node Release Asset | ||
uses: RDXWorks-actions/action-gh-release@master | ||
with: | ||
files: | | ||
babylon-nginx-fullnode-conf.zip | ||
build-push-container-private: | ||
Check failure on line 30 in .github/workflows/artifacts.yml
|
||
if: github.event_name == 'pull_request' | ||
name: Private | ||
uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/docker-build.yml@main | ||
with: | ||
# image information | ||
image_registry: "docker.io" | ||
image_organization: "radixdlt" | ||
image_name: "private-babylon-nginx" | ||
tags: | | ||
${{ github.head_ref }} | ||
development-latest | ||
# build information | ||
restore_artifact: "false" | ||
context: "." | ||
dockerfile: "./Dockerfile.alpine" | ||
platforms: "linux/amd64,linux/arm64" | ||
# optimizations | ||
cache_tag_suffix: "pr" | ||
scan_image: true | ||
snyk_target_ref: ${{ github.ref_name }} | ||
build-push-container-docker: | ||
name: Dockerhub | ||
if: github.event_name == 'release' | ||
uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/docker-build.yml@main | ||
with: | ||
# image information | ||
image_registry: "docker.io" | ||
image_organization: "radixdlt" | ||
image_name: "babylon-nginx" | ||
tags: | | ||
${{ github.event.release.tag_name }} | ||
development-latest | ||
# build information | ||
restore_artifact: "false" | ||
context: "." | ||
dockerfile: "./Dockerfile.alpine" | ||
platforms: "linux/amd64,linux/arm64" | ||
# optimizations | ||
cache_tag_suffix: "release" | ||
enable_dockerhub: "true" | ||
scan_image: true | ||
snyk_target_ref: ${{ github.ref_name }} | ||
secrets: | ||
role_to_assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }} | ||
snyk-monitor-devops: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-push-container-docker | ||
permissions: | ||
id-token: write | ||
pull-requests: read | ||
contents: read | ||
deployments: write | ||
steps: | ||
- uses: radixdlt/public-iac-resuable-artifacts/snyk-container-monitor@main | ||
with: | ||
role_name: ${{ secrets.AWS_ROLE_NAME_SNYK_SECRET }} | ||
app_name: 'babylon-nginx' | ||
step_name: 'snyk-container-monitor' | ||
dockerhub_secret_name: ${{ secrets.AWS_SECRET_NAME_DOCKERHUB }} | ||
snyk_secret_name: ${{ secrets.AWS_SECRET_NAME_SNYK }} | ||
parse_json: true | ||
snyk_org_id: ${{ secrets.SNYK_DEVOPS_ORG_ID }} | ||
image: docker.io/radixdlt/private-babylon-nginx:${{ needs.build-push-container-private.outputs.default_tag }} | ||
target_ref: ${{ github.ref_name }} | ||
snyk-monitor-network: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-push-container-docker | ||
permissions: | ||
id-token: write | ||
pull-requests: read | ||
contents: read | ||
deployments: write | ||
steps: | ||
- uses: radixdlt/public-iac-resuable-artifacts/snyk-container-monitor@main | ||
with: | ||
role_name: ${{ secrets.AWS_ROLE_NAME_SNYK_SECRET }} | ||
app_name: 'babylon-nginx' | ||
step_name: 'snyk-container-monitor' | ||
dockerhub_secret_name: ${{ secrets.AWS_SECRET_NAME_DOCKERHUB }} | ||
snyk_secret_name: ${{ secrets.AWS_SECRET_NAME_SNYK }} | ||
parse_json: true | ||
snyk_org_id: ${{ secrets.SNYK_NETWORK_ORG_ID }} | ||
image: docker.io/radixdlt/private-babylon-nginx:${{ needs.build-push-container-private.outputs.default_tag }} | ||
target_ref: ${{ github.ref_name }} |