Skip to content

Commit

Permalink
Merge branch 'master' into Feature/HideEmptySalaryField
Browse files Browse the repository at this point in the history
  • Loading branch information
killij authored Aug 31, 2023
2 parents a459e0a + e64b48f commit 6946575
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 13 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Create release
on:
push:
branches:
- master

permissions:
contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: npx semantic-release@21
4 changes: 2 additions & 2 deletions .github/workflows/docker-contentful-space-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ name: Docker Contentful Space Export

on:
push:
branches: [ "master", "main" ]
# branches: [ "master", "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
# tags: [ 'v*.*.*' ]
paths: [ 'Contentful-Backup/**/*' ]

env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-contentful-space-import.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ name: Docker Contentful Space Import

on:
push:
branches: [ "master", "main" ]
# branches: [ "master", "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
# tags: [ 'v*.*.*' ]
paths: [ 'Contentful-Backup/**/*' ]

env:
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@ name: Docker Publish
# documentation.

on:
push:
branches: [ "master", "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
release:
types: [published]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:
name: 'Docker Publish'
Expand All @@ -31,12 +28,20 @@ jobs:
id-token: write

steps:
- name: Checkout repository
# Checkout the release tag version
- name: Checkout repository ${{ github.event.release.tag_name }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name }}

# Get git commit hash
- name: Get short hash
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV

# Need to lower case the image name for the docker tags when publishing
- name: Downcase IMAGE_NAME variable
run: echo "IMAGE_NAME_LOWER=${IMAGE_NAME,,}" >> $GITHUB_ENV

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
Expand All @@ -45,7 +50,6 @@ jobs:
with:
cosign-release: 'v1.11.0'


# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
Expand Down Expand Up @@ -76,13 +80,12 @@ jobs:
with:
context: Childrens-Social-Care-CPD
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}:${{ github.event.release.tag_name }}
labels: ${{ steps.meta.outputs.labels }}
build-args: VCSREF=${{ env.sha_short }}
cache-from: type=gha
cache-to: type=gha,mode=max


# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
Expand Down
18 changes: 18 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"branches": ["master"],
"dryRun": false,
"ci": true,
"plugins": [
"@semantic-release/commit-analyzer",
[
"@semantic-release/release-notes-generator",
{
"preset": "angular",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
}
}
],
"@semantic-release/github"
]
}

0 comments on commit 6946575

Please sign in to comment.