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

(add): support for public image publishing #1251

Merged
merged 1 commit into from
Apr 11, 2024
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
65 changes: 65 additions & 0 deletions .github/workflows/ci-image-zq2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI - zq2 release

on:
# On released
release:
types: [published]
workflow_dispatch:
inputs:
commitOrTag:
description: 'Commit or tag'
required: false
default: ''
push:
branch:
- main-zq2
branches-ignore:
- 'release/**'

jobs:
release-image:
permissions:
id-token: write
contents: write
name: build
runs-on: docker
env:
GCP_REGISTRY_DOMAIN: asia-docker.pkg.dev
GCP_REGISTRY: asia-docker.pkg.dev/${{ secrets.GCP_PRD_REGISTRY_PROJECT_ID }}/zilliqa-public
steps:
- name: Clean environment
# Prune the Docker resources created over 10 days before the current execution (change the value for a more/less aggressive cleanup).
shell: bash
run: |
docker system df
docker system prune -a -f --filter "until=168h"
docker system df
- name: 'Checkout scm ${{ inputs.commitOrTag }}'
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.commitOrTag }}
- name: Docker build and push
if: (github.event_name == 'pull_request' || github.event_name == 'push')
uses: Zilliqa/gh-actions-workflows/actions/ci-dockerized-app-build-push@v1
with:
file: docker/Dockerfile
push: true
tag: ${{ env.GCP_REGISTRY }}/scilla
tag-length: 8
registry: ${{ env.GCP_REGISTRY_DOMAIN }}
workload-identity-provider: "${{ secrets.GCP_PRD_GITHUB_WIF }}"
service-account: "${{ secrets.GCP_PRD_GITHUB_SA_DOCKER_REGISTRY }}"
cache-key: ${{ github.event.repository.name }}
- name: Docker build and push
if: github.event_name == 'release'
uses: Zilliqa/gh-actions-workflows/actions/ci-dockerized-app-build-push@v1
with:
file: docker/Dockerfile
push: true
tag: ${{ env.GCP_REGISTRY }}/scilla:${{ github.ref_name }}
tag-length: 8
registry: ${{ env.GCP_REGISTRY_DOMAIN }}
workload-identity-provider: "${{ secrets.GCP_PRD_GITHUB_WIF }}"
service-account: "${{ secrets.GCP_PRD_GITHUB_SA_DOCKER_REGISTRY }}"
cache-key: ${{ github.event.repository.name }}
Loading