mirror of https://github.com/Lissy93/dashy.git
🐳 Working action for pushing to Docker to GHCR
This commit is contained in:
parent
e8707ae4c3
commit
35c2516233
|
@ -16,12 +16,16 @@ jobs:
|
|||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
# Fetch the code
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
# Build the image from default Dockerfile
|
||||
- name: Build image
|
||||
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
|
||||
# Login into GH container registry
|
||||
- name: Log in to registry
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
# Push build image
|
||||
- name: Push image
|
||||
run: |
|
||||
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
|
||||
|
|
Loading…
Reference in New Issue