mirror of
https://github.com/woodchen-ink/docker-firefox.git
synced 2025-07-18 05:42:00 +08:00
Also push the Docker image to the GitHub Container Registry.
This commit is contained in:
parent
27ea856429
commit
cd8e96dc18
9
.github/workflows/build-image.yml
vendored
9
.github/workflows/build-image.yml
vendored
@ -62,6 +62,7 @@ jobs:
|
||||
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
|
||||
TAGS="$TAGS,${{ env.DOCKER_IMAGE_NAME }}:latest"
|
||||
fi
|
||||
TAGS="$TAGS,$(echo $TAGS | tr ',' '\n' | sed 's|^|ghcr.io/|' | tr '\n' ',')"
|
||||
# Determine the release type.
|
||||
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
|
||||
IS_RELEASE=yes
|
||||
@ -106,6 +107,14 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
if: ${{ steps.prep.outputs.is_release == 'yes' }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
Loading…
x
Reference in New Issue
Block a user