Update README (#9) #6
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 Docker Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-contribcard-sticker-image: | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| env: | |
| OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }} | |
| OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }} | |
| OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }} | |
| OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }} | |
| OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Authenticate to OCI Registry | |
| uses: oracle-actions/[email protected] | |
| id: login-ocir | |
| with: | |
| auth_token: ${{ secrets.OCI_AUTH_TOKEN }} | |
| - name: Get OCIR repository | |
| uses: oracle-actions/[email protected] | |
| id: get-ocir-repository | |
| with: | |
| name: contribcard/sticker | |
| compartment: ${{ secrets.OCI_COMPARTMENT_OCID }} | |
| - name: Build and push Docker image | |
| run: | | |
| IMAGE_TAG="${{ steps.get-ocir-repository.outputs.repo_path }}:${{ github.sha }}" | |
| docker build -t ${IMAGE_TAG} . | |
| docker push ${IMAGE_TAG} |