Skip to content

Commit

Permalink
ci: publish docker images on PRs for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
codfish committed Feb 10, 2024
1 parent a7d7235 commit 85b714e
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,21 @@ jobs:
id: semantic-test
uses: ./
with:
dry_run: true
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'fooalpha',
'foobeta',
'next',
'next-major',
{
name: 'beta',
prerelease: true
},
{
name: 'alpha',
prerelease: true
}
{ name: 'beta', prerelease: true },
{ name: 'alpha', prerelease: true },
]
dry-run: true
repository-url: https://github.com/codfish/semantic-release-action.git
tag-format: 'v${version}'
extends: '@semantic-release/apm-config'
tag-format: 'ver${version}'
additional-packages: |
['@semantic-release/apm', '@semantic-release/git']
plugins: |
Expand All @@ -67,3 +63,15 @@ jobs:
echo "should be empty: $RELEASE_PATCH"
env:
OUTPUTS: ${{ toJson(steps.semantic.outputs) }}

- name: docker login
run: |
echo "$GCR_TOKEN" | docker login ghcr.io -u codfish --password-stdin
env:
GCR_TOKEN: ${{ secrets.GCR_TOKEN }}

# Dockerhub is auto synced with the repo, no need to explicitly deploy
- name: build and push branch docker image to GCR
run: |
docker build -t ghcr.io/codfish/semantic-release-action:$GITHUB_HEAD_REF .
docker push ghcr.io/codfish/semantic-release-action:$GITHUB_HEAD_REF

0 comments on commit 85b714e

Please sign in to comment.