diff --git a/.gitea/workflows/cron.yaml b/.gitea/workflows/cron.yaml index 105acc8..7fd5870 100644 --- a/.gitea/workflows/cron.yaml +++ b/.gitea/workflows/cron.yaml @@ -32,11 +32,11 @@ jobs: images: jcabillot/offlineimap tags: | type=raw,value=latest - type=raw,value=${{ steps.get-latest-tag.outputs.tag }},enable=${{ steps.get-latest-tag.outputs.tag != '' }} + type=raw,value=${{ steps.get-latest-tag.outputs.tag }}-latest,enable=${{ steps.get-latest-tag.outputs.tag != '' }} - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 with: context: . push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - pull: true + pull: true \ No newline at end of file diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main.yaml index 7376372..5955ec4 100644 --- a/.gitea/workflows/main.yaml +++ b/.gitea/workflows/main.yaml @@ -11,7 +11,15 @@ jobs: continue-on-error: true with: dockerfile: Dockerfile + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4 + - run: docker build -t ci-image:${{ github.sha }} . + - run: bash tests/test.sh ci-image:${{ github.sha }} build-push: + needs: [test] runs-on: ubuntu-latest steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 @@ -33,14 +41,8 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} pull: true - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4 - - run: docker build -t ci-image:${{ github.sha }} . - - run: bash tests/test.sh ci-image:${{ github.sha }} tag: + needs: [build-push] runs-on: ubuntu-latest steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 diff --git a/.gitea/workflows/tag.yaml b/.gitea/workflows/tag.yaml index 74c26e2..67bdcda 100644 --- a/.gitea/workflows/tag.yaml +++ b/.gitea/workflows/tag.yaml @@ -26,10 +26,11 @@ jobs: images: jcabillot/offlineimap tags: | type=ref,event=tag + type=ref,event=tag,suffix=-latest - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 with: context: . push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - pull: true + pull: true \ No newline at end of file