Build and push #3
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: Build and push | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Preparation step | |
run: | | |
echo "REPOSITORY_OWNER_LC=${REPOSITORY_OWNER,,}" >> ${GITHUB_ENV} | |
env: | |
REPOSITORY_OWNER: '${{ github.repository_owner }}' | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ env.REPOSITORY_OWNER_LC }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build the image | |
run: docker build --target cli --tag ghcr.io/${{ env.REPOSITORY_OWNER_LC }}/arcan-2-cli-trial:latest . | |
- name: Push the image | |
run: docker push ghcr.io/${{ env.REPOSITORY_OWNER_LC }}/arcan-2-cli-trial:latest |