forked from acsone/kwkhtmltopdf
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from vrenaville/new_dev
feat: switch to odoo package + github actions
- Loading branch information
Showing
3 changed files
with
54 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Test, build and push to github packages | ||
on: | ||
pull_request: | ||
branches: | ||
- 'master' | ||
- 'devel' | ||
push: | ||
branches: | ||
- '*' | ||
tags: | ||
- '*.*.*' | ||
|
||
jobs: | ||
build-images: | ||
if: ${{ github.event_name == 'push' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set ENV for branch master/main | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
run: echo "RELEASE_VERSION=latest" >> $GITHUB_ENV | ||
- name: Set ENV for tags | ||
if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Set ENV for specific branch | ||
if: ${{ startsWith(github.ref, 'refs/heads/') && !endsWith(github.ref, '/master') }} | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}-${GITHUB_SHA}" >> $GITHUB_ENV | ||
- name: Login to ghio | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ secrets.GH_USER }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta-kwkhtmltopdf | ||
uses: docker/metadata-action@v5.0.0 | ||
with: | ||
images: | | ||
ghcr.io/camptocamp/kwkhtmltopdf | ||
- name: Build + Push kwkhtmltopdf | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ steps.meta-kwkhtmltopdf.outputs.tags }} | ||
labels: ${{ steps.meta-kwkhtmltopdf.outputs.labels }} | ||
|
This file was deleted.
Oops, something went wrong.
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