diff --git a/.github/workflows/on_push_to_main.yaml b/.github/workflows/on_push_to_main.yaml deleted file mode 100644 index 9755cc5b..00000000 --- a/.github/workflows/on_push_to_main.yaml +++ /dev/null @@ -1,93 +0,0 @@ -name: Push latest image to GitHub Container Registry - -on: - push: - branches: - - main - workflow_dispatch: - -env: - IMAGE_NAME: ghcr.io/rdflib/prez - -jobs: - push_latest: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - # Required by WyriHaximus/github-action-get-previous-tag - fetch-depth: 0 - - - name: Get latest tag - id: latest-tag - uses: WyriHaximus/github-action-get-previous-tag@v1 - with: - fallback: "0.1.0" - - - name: Tag starts with v - id: tag-starts-with-v - if: ${{ startsWith(steps.latest-tag.outputs.tag, 'v') }} - uses: mad9000/actions-find-and-replace-string@4 - with: - source: ${{ steps.latest-tag.outputs.tag }} - find: "v" - replace: "" - - - name: Tag value - id: tag-value - uses: haya14busa/action-cond@v1 - with: - cond: ${{ startsWith(steps.latest-tag.outputs.tag, 'v') }} - if_true: ${{ steps.tag-starts-with-v.outputs.value }} - if_false: ${{ steps.latest-tag.outputs.tag }} - - - name: Get next semver patch version - id: patch - uses: "WyriHaximus/github-action-next-semvers@v1" - with: - version: ${{ steps.tag-value.outputs.value }} - - - name: Get git commits since last tag - id: commitscount - run: echo "value=$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count)" >> $GITHUB_OUTPUT - - - name: Get git commit hash - id: commit-hash - uses: docker/metadata-action@v5 - with: - images: ${{ env.IMAGE_NAME }} - tags: type=sha - - - name: Rename git commit hash - id: hash - uses: mad9000/actions-find-and-replace-string@5 - with: - source: ${{ steps.commit-hash.outputs.version }} - find: "sha-" - replace: dev.${{ steps.commitscount.outputs.value }}. - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v6 - with: - push: true - build-args: PREZ_VERSION=${{ steps.patch.outputs.patch }}-${{ steps.hash.outputs.value }} - tags: | - ${{ env.IMAGE_NAME }}:${{ steps.patch.outputs.patch }}-${{ steps.hash.outputs.value }} - ${{ env.IMAGE_NAME }}:dev - # Set provenance to false due to issue documented here: https://github.com/docker/build-push-action/issues/778 - provenance: false - platforms: linux/amd64 #,linux/arm64 temporarily disable due to https://github.com/oxigraph/oxigraph/issues/1077 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 33152c60..4bfbdac5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -68,6 +68,7 @@ jobs: type=semver,pattern={{version}},value=${{ needs.release.outputs.new_release_version }} type=semver,pattern={{major}}.{{minor}},value=${{ needs.release.outputs.new_release_version }} type=semver,pattern={{major}},value=${{ needs.release.outputs.new_release_version }} + type=raw,value=latest - name: Set up QEMU uses: docker/setup-qemu-action@v3