mirror of
https://github.com/woodchen-ink/docker-firefox.git
synced 2025-07-18 13:52:02 +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
|
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
|
||||||
TAGS="$TAGS,${{ env.DOCKER_IMAGE_NAME }}:latest"
|
TAGS="$TAGS,${{ env.DOCKER_IMAGE_NAME }}:latest"
|
||||||
fi
|
fi
|
||||||
|
TAGS="$TAGS,$(echo $TAGS | tr ',' '\n' | sed 's|^|ghcr.io/|' | tr '\n' ',')"
|
||||||
# Determine the release type.
|
# Determine the release type.
|
||||||
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
|
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
|
||||||
IS_RELEASE=yes
|
IS_RELEASE=yes
|
||||||
@ -106,6 +107,14 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
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
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user