mirror of
https://github.com/tchapi/davis.git
synced 2025-01-17 21:08:17 +01:00
Force use of ghcr.io
This commit is contained in:
parent
5a7bc66e38
commit
7daea87d62
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
@ -8,13 +8,6 @@ jobs:
|
||||
name: Push Docker image to GitHub Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@ -22,18 +15,26 @@ jobs:
|
||||
name: Prepare tags
|
||||
id: prepare_tags
|
||||
run: |
|
||||
REPOSITORY=ghcr.io
|
||||
DOCKER_IMAGE=tchapi/davis
|
||||
VERSION=edge
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
fi
|
||||
TAGS="${DOCKER_IMAGE}:${VERSION}"
|
||||
TAGS="${REPOSITORY}/${DOCKER_IMAGE}:${VERSION}"
|
||||
if [ "${{ github.event_name }}" = "push" ]; then
|
||||
TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}"
|
||||
TAGS="$TAGS,${REPOSITORY}/${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}"
|
||||
fi
|
||||
echo ::set-output name=version::${VERSION}
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: Build and Push to GitHub Packages
|
||||
id: docker_build
|
||||
|
Loading…
x
Reference in New Issue
Block a user