Release #2
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: Release | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: "Bump version and publish docker image" | |
permissions: write-all | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Version Bump | |
run: | | |
npm install -g commitlint semantic-release semantic-release-github-actions-tags @semantic-release/changelog @semantic-release/git | |
npx semantic-release --ci | |
env: | |
GH_TOKEN: ${{ secrets.GH_AUTH_TOKEN }} | |
- name: Build Docker Image | |
env: | |
POSTGRES_USER: ${{ env.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
run: | | |
docker-compose -f docker-compose.yml build | |
- name: Authenticate to GitHub Container Registry | |
run: echo ${{ secrets.GH_AUTH_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
- name: Push Docker Image to GitHub Packages | |
run: | | |
NEW_VERSION=$(node -p "require('./package.json').version") | |
docker tag osc ghcr.io/${{ github.repository_owner }}/osc:${NEW_VERSION} | |
docker push ghcr.io/${{ github.repository_owner }}/osc:${NEW_VERSION} | |
env: | |
GHCR_PAT: ${{ secrets.GH_AUTH_TOKEN }} |