Skip to content

CD

CD #8

Workflow file for this run

name: CD
on: release
env:
REGISTRY: ghcr.io
IMAGE_NAME: ankama-launcher
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.PUSH_CONTAINER_TOKEN }}
- name: Get latest tag (and remove the "v" prefix from it)
run: echo "TAG=$(git describe --abbrev=0 --tags | sed "s/v//g")" >> $GITHUB_OUTPUT
id: version
- name: Build container
run: docker build -t ${{ env.IMAGE_NAME}}:latest -t ${{ env.IMAGE_NAME}}:${{ steps.version.outputs.TAG }} .
- name: Push container
run: |
docker push ${{ env.REGISTRY }}/${{ github.repository }}:latest
docker push ${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.version.outputs.TAG }}