Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push latest tag to github registry #344

Merged
merged 2 commits into from
Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,34 @@ jobs:
uses: docker/setup-buildx-action@v2.0.0
-
name: Login to DockerHub
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v2.0.0
with:
username: ${{ github.actor }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Set images
id: images
run: |
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
echo "::set-output name=images::andrcuns/allure-report-publisher,ghcr.io/andrcuns/allure-report-publisher"
else
echo "::set-output name=images::ghcr.io/andrcuns/allure-report-publisher"
fi
-
name: Docker tags
id: tags
uses: docker/metadata-action@v4
with:
images: |
andrcuns/allure-report-publisher
flavor: |
latest=false
images: ${{ steps.images.outputs.images }}
flavor: latest=false
tags: |
type=raw,value=latest
type=semver,pattern={{version}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
load: true
tags: publisher:latest
cache-from: type=gha
cache-to: type=gha,mode=max
-
name: Download allure reports
uses: actions/download-artifact@v3
Expand Down