Skip to content

Update deploy.yml

Update deploy.yml #73

Workflow file for this run

name: deploy
on:
push:
branches:
- master
jobs:
docker-deploy:
runs-on: ubuntu-latest
env:
CONTAINER: ghcr.io/rseng/rse
steps:
- uses: actions/checkout@v2
- name: Build Docker Image
run: docker build -t "${CONTAINER}" .
- name: GHCR Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag and Push images
run: |
DOCKER_TAG=$(docker run "${CONTAINER}:latest" --version)
echo "Docker tag is: ${DOCKER_TAG}"
docker tag "${CONTAINER}:latest" "${CONTAINER}:${DOCKER_TAG}"
docker push "${CONTAINER}:latest"
docker push "${CONTAINER}:${DOCKER_TAG}"