feat: use node v20.12.1 and node-slim image instead of alpine #186
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate | |
on: pull_request_target | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- run: npm ci | |
- run: npm run lint | |
# dog-food testing. Should not release here at all, cause it runs on a PR. | |
- name: semantic-release | |
id: semantic-test | |
uses: ./ | |
with: | |
branches: | | |
[ | |
'+([0-9])?(.{+([0-9]),x}).x', | |
'main', | |
'fooalpha', | |
'foobeta', | |
'next', | |
'next-major', | |
{ name: 'beta', prerelease: true }, | |
{ name: 'alpha', prerelease: true }, | |
] | |
dry-run: true | |
repository-url: https://github.com/codfish/semantic-release-action.git | |
extends: '@semantic-release/apm-config' | |
tag-format: 'ver${version}' | |
additional-packages: | | |
['@semantic-release/apm', '@semantic-release/git'] | |
plugins: | | |
['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/github', '@semantic-release/apm', '@semantic-release/git'] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# dog-food testing. Should not release here at all, cause it runs on a PR. | |
- name: semantic-release with no inputs | |
id: semantic | |
uses: ./ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: test output | |
if: steps.semantic.outputs.new-release-published == 'false' | |
run: | | |
echo "$OUTPUTS" | |
echo "should be false: $NEW_RELEASE_PUBLISHED" | |
echo "should be empty: $RELEASE_MAJOR" | |
echo "should be empty: $RELEASE_MINOR" | |
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 |