Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

chore: build to github registry #17

chore: build to github registry

chore: build to github registry #17

Workflow file for this run

name: docker
on:
push:
branches:
- main
tags:
- '*'
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Log in to the Container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get tag
id: get-tag
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}
- name: Build and push
uses: docker/build-push-action@v4
with:
build-args: |
TARGET=${{ matrix.contract }}
push: true
tags: |
${{ env.REGISTRY }}/elric-rs/app:latest
${{ env.REGISTRY }}/elric-rs/app:${{ steps.get-tag.outputs.short_ref }}