Better test workflow

This commit is contained in:
Adam Štrauch 2025-01-19 23:01:34 +01:00
parent ef43ec73ad
commit c6d7126d2a
Signed by: cx
GPG key ID: 7262DAFE292BCE20
2 changed files with 13 additions and 7 deletions

View file

@ -25,9 +25,11 @@ jobs:
- name: Set version from input - name: Set version from input
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=${{ github.event.inputs.version }}" >> $GITHUB_ENV run: echo "TAG_NAME=${{ github.event.inputs.version }}" >> $GITHUB_ENV
- name: Registry login
run: docker login gitea.ceperka.net -u "${{ secrets.HARBOR_REPO_USERNAME }}" -p "${{ secrets.HARBOR_REPO_PASSWORD }}"
- name: Final build - name: Final build
run: | run: task squashed REPO=harbor.rosti.cz/rosti/runtime VERSION=${{ env.TAG_NAME }}
docker login gitea.ceperka.net -u "${{ secrets.HARBOR_REPO_USERNAME }}" -p "${{ secrets.HARBOR_REPO_PASSWORD }}" - name: Push:
task squashed REPO=harbor.rosti.cz/rosti/runtime VERSION=${{ env.TAG_NAME }} run: task push REPO=harbor.rosti.cz/rosti/runtime VERSION=${{ env.TAG_NAME }}
task push REPO=harbor.rosti.cz/rosti/runtime VERSION=${{ env.TAG_NAME }}

View file

@ -9,11 +9,15 @@ jobs:
runs-on: [dev, amd64] runs-on: [dev, amd64]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Test build - name: docker login
run: | run: |
# echo "${{ secrets.repo_password }}" | podman login -u $USERNAME --password-stdin $REPO
docker login gitea.ceperka.net -u "${{ secrets.REPO_USERNAME }}" -p "${{ secrets.REPO_PASSWORD }}" docker login gitea.ceperka.net -u "${{ secrets.REPO_USERNAME }}" -p "${{ secrets.REPO_PASSWORD }}"
task pipeline REPO=gitea.ceperka.net/rosti/runtime VERSION=pipeline - name: Build
run: task build REPO=gitea.ceperka.net/rosti/runtime VERSION=pipeline
- name: Test
run: task test REPO=gitea.ceperka.net/rosti/runtime VERSION=pipeline
- name: Push
run: task push REPO=gitea.ceperka.net/rosti/runtime VERSION=pipeline
- name: Cleaning step - name: Cleaning step
if: always() if: always()
run: docker stop dev_test run: docker stop dev_test