* add ghcr

* Update .github/workflows/release-dev.yaml

Co-authored-by: nils måsén <nils@piksel.se>

* Update .github/workflows/release.yml

Co-authored-by: nils måsén <nils@piksel.se>

* Apply suggestions from code review

I might be dyslectic

* Update .github/workflows/release.yml

Co-authored-by: nils måsén <nils@piksel.se>

* Update .github/workflows/release.yml

Co-authored-by: nils måsén <nils@piksel.se>

Co-authored-by: nils måsén <nils@piksel.se>
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
pull/917/head
ksurl 4 years ago committed by GitHub
parent 3de202a965
commit 29f5c4b254
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,10 +38,20 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: jerray/publish-docker-action@master - name: Publish to Docker Hub
uses: jerray/publish-docker-action@master
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }} password: ${{ secrets.DOCKERHUB_PASSWORD }}
file: dockerfiles/Dockerfile.self-contained file: dockerfiles/Dockerfile.self-contained
repository: containrrr/watchtower repository: containrrr/watchtower
tags: latest-dev tags: latest-dev
- name: Publish to GHCR
uses: jerray/publish-docker-action@master
with:
username: ${{ secrets.BOT_USERNAME }}
password: ${{ secrets.BOT_GHCR_PAT }}
file: dockerfiles/Dockerfile.self-contained
registry: ghcr.io
repository: containrrr/watchtower
tags: latest-dev

@ -95,27 +95,36 @@ jobs:
containrrr/watchtower:amd64-$DH_TAG \ containrrr/watchtower:amd64-$DH_TAG \
containrrr/watchtower:i386-$DH_TAG \ containrrr/watchtower:i386-$DH_TAG \
containrrr/watchtower:armhf-$DH_TAG \ containrrr/watchtower:armhf-$DH_TAG \
containrrr/watchtower:arm64v8-$DH_TAG containrrr/watchtower:arm64v8-$DH_TAG \
ghcr.io/containrrr/watchtower:$DH_TAG \
ghcr.io/containrrr/watchtower:amd64-$DH_TAG \
ghcr.io/containrrr/watchtower:i386-$DH_TAG \
ghcr.io/containrrr/watchtower:armhf-$DH_TAG \
ghcr.io/containrrr/watchtower:arm64v8-$DH_TAG
- name: Annotate manifest for version - name: Annotate manifest for version
run: | run: |
for REPO in '' ghrc.io/ ; do
docker manifest annotate \ docker manifest annotate \
containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \ ${REPO}containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \
containrrr/watchtower:i386-$(echo $TAG | sed 's/^v*//') \ ${REPO}containrrr/watchtower:i386-$(echo $TAG | sed 's/^v*//') \
--os linux \ --os linux \
--arch 386 --arch 386
docker manifest annotate \ docker manifest annotate \
containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \ ${REPO}containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \
containrrr/watchtower:armhf-$(echo $TAG | sed 's/^v*//') \ ${REPO}containrrr/watchtower:armhf-$(echo $TAG | sed 's/^v*//') \
--os linux \ --os linux \
--arch arm --arch arm
docker manifest annotate \ docker manifest annotate \
containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \ ${REPO}containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \
containrrr/watchtower:arm64v8-$(echo $TAG | sed 's/^v*//') \ ${REPO}containrrr/watchtower:arm64v8-$(echo $TAG | sed 's/^v*//') \
--os linux \ --os linux \
--arch arm64 \ --arch arm64 \
--variant v8 --variant v8
done
- name: Create manifest for latest - name: Create manifest for latest
run: | run: |
docker manifest create \ docker manifest create \
@ -123,27 +132,36 @@ jobs:
containrrr/watchtower:amd64-latest \ containrrr/watchtower:amd64-latest \
containrrr/watchtower:i386-latest \ containrrr/watchtower:i386-latest \
containrrr/watchtower:armhf-latest \ containrrr/watchtower:armhf-latest \
containrrr/watchtower:arm64v8-latest containrrr/watchtower:arm64v8-latest \
ghcr.io/containrrr/watchtower:latest \
ghcr.io/containrrr/watchtower:amd64-latest \
ghcr.io/containrrr/watchtower:i386-latest \
ghcr.io/containrrr/watchtower:armhf-latest \
ghcr.io/containrrr/watchtower:arm64v8-latest
- name: Annotate manifest for latest - name: Annotate manifest for latest
run: | run: |
for REPO in '' ghrc.io/ ; do
docker manifest annotate \ docker manifest annotate \
containrrr/watchtower:latest \ ${REPO}containrrr/watchtower:latest \
containrrr/watchtower:i386-latest \ ${REPO}containrrr/watchtower:i386-latest \
--os linux \ --os linux \
--arch 386 --arch 386
docker manifest annotate \ docker manifest annotate \
containrrr/watchtower:latest \ ${REPO}containrrr/watchtower:latest \
containrrr/watchtower:armhf-latest \ ${REPO}containrrr/watchtower:armhf-latest \
--os linux \ --os linux \
--arch arm --arch arm
docker manifest annotate \ docker manifest annotate \
containrrr/watchtower:latest \ ${REPO}containrrr/watchtower:latest \
containrrr/watchtower:arm64v8-latest \ ${REPO}containrrr/watchtower:arm64v8-latest \
--os linux \ --os linux \
--arch arm64 \ --arch arm64 \
--variant v8 --variant v8
done
- name: Push manifests to Dockerhub - name: Push manifests to Dockerhub
env: env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
@ -152,6 +170,11 @@ jobs:
docker login -u $DOCKER_USER -p $DOCKER_TOKEN && \ docker login -u $DOCKER_USER -p $DOCKER_TOKEN && \
docker manifest push containrrr/watchtower:$(echo $TAG | sed 's/^v*//') && \ docker manifest push containrrr/watchtower:$(echo $TAG | sed 's/^v*//') && \
docker manifest push containrrr/watchtower:latest docker manifest push containrrr/watchtower:latest
- name: Push manifests to GitHub Container Registry
run: |
echo "$BOT_GHCR_PAT" | docker login -u $BOT_USERNAME --password-stdin && \
docker manifest push ghcr.io/containrrr/watchtower:$(echo $TAG | sed 's/^v*//') && \
docker manifest push ghcr.io/containrrr/watchtower:latest
publish-docs: publish-docs:
name: Publish Docs name: Publish Docs

Loading…
Cancel
Save