Update download.md #32
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: Docker Build | |
on: | |
push: | |
tags: | |
branches: | |
- main | |
jobs: | |
docker-build: | |
runs-on: ubuntu-latest | |
env: | |
repository: eldoriarpg/github | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Build Image | |
run: docker build . -f Dockerfile -t ghcr.io/$repository:${{ github.sha }} | |
- name: Login to Registry | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u $ --password-stdin ghcr.io | |
- name: Push image | |
run: | | |
docker push ghcr.io/$repository:${{ github.sha }} | |
- name: Tag & Push branch image | |
run: | | |
docker image tag ghcr.io/$repository:${{ github.sha }} ghcr.io/$repository:${{ github.ref_name }} | |
docker push ghcr.io/$repository:${{ github.ref_name }} | |
- name: Tag & Push latest image | |
if: github.ref_name == 'main' | |
run: | | |
docker image tag ghcr.io/$repository:${{ github.sha }} ghcr.io/$repository:latest | |
docker push ghcr.io/$repository:latest |