fix dockerfile #229
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: Reliably CLI Release | |
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
checks: | |
uses: ./.github/workflows/cli-check.yaml | |
publish-wheels: | |
name: Publish wheels | |
environment: release | |
permissions: | |
id-token: write | |
runs-on: ubuntu-22.04 | |
needs: | |
- checks | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up PDM | |
uses: pdm-project/setup-pdm@v3 | |
with: | |
python-version: "3.11" | |
- name: Build wheels | |
run: pdm build --no-sdist | |
- name: Publish wheels | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
build-container: | |
name: Build containers | |
runs-on: ubuntu-22.04 | |
needs: | |
- publish-wheels | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: meta for the container image | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
flavor: | | |
prefix= | |
images: | | |
ghcr.io/reliablyhq/cli/cli | |
tags: | | |
type=sha,prefix=,format=long | |
type=raw,value=latest | |
- name: Build and push Container | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: ${{ github.event_name != 'pull_request' }} | |
platforms: linux/amd64 | |
file: ./Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-full-container: | |
name: Build full containers with extensions | |
runs-on: ubuntu-22.04 | |
needs: | |
- publish-wheels | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: meta for the container image | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
flavor: | | |
prefix= | |
images: | | |
ghcr.io/reliablyhq/cli/full | |
tags: | | |
type=sha,prefix=,format=long | |
type=raw,value=latest | |
- name: Build and push Container | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./container | |
push: ${{ github.event_name != 'pull_request' }} | |
platforms: linux/amd64 | |
file: ./container/Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
needs: | |
- build-container | |
- build-full-container | |
steps: | |
- name: Build Changelog | |
id: github_release | |
uses: mikepenz/release-changelog-builder-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
configurationJson: | | |
{ | |
"template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>", | |
"categories": [ | |
{ | |
"title": "## 💬 Other", | |
"labels": ["other"] | |
}, | |
{ | |
"title": "## 📦 Dependencies", | |
"labels": ["dependencies"] | |
} | |
] | |
} | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: ${{steps.github_release.outputs.changelog}} |