| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- name: 'Build and Publish Container'
- description: 'Build and publish container'
- inputs:
- actor:
- required: true
- type: string
- image_tag:
- required: true
- type: string
- release_version:
- required: true
- type: string
- GITHUB_TOKEN:
- required: true
- type: string
- runs:
- using: "composite"
- steps:
- - name: Log into registry ghcr.io
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ inputs.actor }}
- password: ${{ inputs.GITHUB_TOKEN }}
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
- with:
- buildkitd-flags: --debug
- - name: Install Go
- uses: actions/setup-go@v5
- with:
- go-version: 'stable'
- - name: Set up just
- uses: extractions/setup-just@v2
- ## Install manifest-tool, which is required to combine multi-arch images
- ## https://github.com/estesp/manifest-tool
- - name: Install manifest-tool
- shell: bash
- run: |
- mkdir -p manifest-tool
- pushd manifest-tool
- wget -q https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
- tar -xzf binaries-manifest-tool-2.0.8.tar.gz
- cp manifest-tool-linux-amd64 manifest-tool
- echo "$(pwd)" >> $GITHUB_PATH
- - name: Build and push (multiarch) OpenCost
- shell: bash
- env:
- IMAGE_TAG: ${{ inputs.image_tag }}
- RELEASE_VERSION: ${{ inputs.release_version }}
- run: |
- just build '$IMAGE_TAG' '$RELEASE_VERSION'
|