try: build reusable image #1
This file contains hidden or 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
| name: Build Golden Base Image | |
| on: | |
| push: | |
| branches: | |
| - 'chore/improve-ci' | |
| workflow_dispatch: | |
| inputs: | |
| release_tag: | |
| description: 'Image tag (e.g., v7.0.0-dev)' | |
| required: true | |
| default: 'v7.0.0-dev' | |
| danger_version: | |
| description: 'dsDangerClient branch/tag' | |
| required: true | |
| default: 'v7.0.0-dev' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and Push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| build-args: | | |
| DANGER_VERSION=${{ github.event.inputs.danger_version || 'v7.0.0-dev' }} | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/ds-base-env:${{ github.event.inputs.release_tag || 'v7.0.0-dev' }} |