Shard 913 temp #12
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
name: Publish Jenkins Test Docker Image | |
on: | |
push: | |
branches: ['dev'] | |
pull_request: | |
branches: ['dev'] | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/json-rpc-server | |
IMAGE_TAG=${{ github.event.inputs.tag }} | |
# Build the Docker image with the 'latest' tag | |
docker build . --file Dockerfile --tag $IMAGE_ID:$IMAGE_TAG | |
# Push the 'latest' tagged image to the registry | |
docker push $IMAGE_ID:$IMAGE_TAG |