Skip to content

Commit

Permalink
only build/push to dockerhub on appclacks/cabourotte registry
Browse files Browse the repository at this point in the history
  • Loading branch information
sgaunet committed Jul 24, 2023
1 parent a2306ee commit eda073c
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,20 @@ jobs:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow

- name: Login to GitHub Container Registry
- name: Login to Appclacks Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build/Push image ghcr.io/mcorbin/cabourotte:latest
username: ${{ secrets.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build/Push image appclacks/cabourotte:latest
shell: /usr/bin/bash {0}
run: |
docker build . -t ghcr.io/mcorbin/cabourotte:latest
docker push ghcr.io/mcorbin/cabourotte:latest
docker build . -t appclacks/cabourotte:latest
docker push appclacks/cabourotte:latest
# get tags of current commit
tag=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))
if [ ! -z "$tag" ]; then
echo "Tag name from git describe: $tag"
docker tag ghcr.io/mcorbin/cabourotte:latest ghcr.io/mcorbin/cabourotte:$tag
docker push ghcr.io/mcorbin/cabourotte:$tag
docker tag appclacks/cabourotte:latest appclacks/cabourotte:$tag
docker push appclacks/cabourotte:$tag
fi
- name: Login to Docker Container Registry
uses: docker/login-action@v2
with:
username: ${{ vars.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Tag and Push image to docker registry
shell: /usr/bin/bash {0}
run: |
docker tag ghcr.io/mcorbin/cabourotte:latest mcorbin/cabourotte:latest
docker push mcorbin/cabourotte:latest
# get tags of current commit
tag=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))
if [ ! -z "$tag" ]; then
echo "Tag name from git describe: $tag"
docker tag ghcr.io/mcorbin/cabourotte:latest mcorbin/cabourotte:$tag
docker push mcorbin/cabourotte:$tag
fi

0 comments on commit eda073c

Please sign in to comment.