Compare commits
No commits in common. "b77ae05fcf35eb9e2deea286c0f45b675a168417" and "df802c24a0107add4a7744256c06663e7721fb39" have entirely different histories.
b77ae05fcf
...
df802c24a0
1 changed files with 8 additions and 15 deletions
|
@ -13,8 +13,6 @@ jobs:
|
||||||
runs-on: container
|
runs-on: container
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
name: Install pnpm
|
name: Install pnpm
|
||||||
|
@ -33,22 +31,17 @@ jobs:
|
||||||
- name: Build package (transpile ts => js)
|
- name: Build package (transpile ts => js)
|
||||||
run: ng build
|
run: ng build
|
||||||
|
|
||||||
#- name: Git unshallow - get all history from Git to get the tag for the computation of the version
|
- name: Git unshallow - get all history from Git to get the tag for the computation of the version
|
||||||
# if: ${{ inputs.build }}
|
if: ${{ inputs.build }}
|
||||||
# run: git pull --unshallow
|
run: git pull --unshallow
|
||||||
|
|
||||||
- name: Get the version from git
|
- name: Get the version from git
|
||||||
|
if: ${{ inputs.build }}
|
||||||
id: version
|
id: version
|
||||||
run: echo "version=$(git describe --dirty --tags)" >> $GITHUB_OUTPUT
|
run: echo "version=$(git describe --dirty --tags)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Check if the container should be built
|
|
||||||
id: builder
|
|
||||||
env:
|
|
||||||
builder: ${{ inputs.build || !contains(steps.version.output.version, '-') }}
|
|
||||||
run: echo $builder
|
|
||||||
|
|
||||||
- name: Build container
|
- name: Build container
|
||||||
if: ${{ steps.builder.builder }}
|
if: ${{ inputs.build }}
|
||||||
uses: actions/buildah-build@v1
|
uses: actions/buildah-build@v1
|
||||||
with:
|
with:
|
||||||
image: treetrail-frontend
|
image: treetrail-frontend
|
||||||
|
@ -59,13 +52,13 @@ jobs:
|
||||||
./Containerfile
|
./Containerfile
|
||||||
|
|
||||||
- name: Workaround for bug of podman-login
|
- name: Workaround for bug of podman-login
|
||||||
if: ${{ steps.builder.builder }}
|
if: ${{ inputs.build }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $HOME/.docker
|
mkdir -p $HOME/.docker
|
||||||
echo "{ \"auths\": {} }" > $HOME/.docker/config.json
|
echo "{ \"auths\": {} }" > $HOME/.docker/config.json
|
||||||
|
|
||||||
- name: Log in to container registry (with another workaround)
|
- name: Log in to container registry (with another workaround)
|
||||||
if: ${{ steps.builder.builder }}
|
if: ${{ inputs.build }}
|
||||||
uses: actions/podman-login@v1
|
uses: actions/podman-login@v1
|
||||||
with:
|
with:
|
||||||
registry: ${{ vars.REGISTRY }}
|
registry: ${{ vars.REGISTRY }}
|
||||||
|
@ -74,7 +67,7 @@ jobs:
|
||||||
auth_file_path: /tmp/auth.json
|
auth_file_path: /tmp/auth.json
|
||||||
|
|
||||||
- uses: actions/push-to-registry@v2
|
- uses: actions/push-to-registry@v2
|
||||||
if: ${{ steps.builder.builder }}
|
if: ${{ inputs.build }}
|
||||||
with:
|
with:
|
||||||
registry: "docker://${{ vars.REGISTRY }}"
|
registry: "docker://${{ vars.REGISTRY }}"
|
||||||
image: treetrail-frontend
|
image: treetrail-frontend
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue