From 2b8c6835131ec8a429d59d922b542f706e2e6c16 Mon Sep 17 00:00:00 2001 From: Maciej Lebiest Date: Mon, 13 Nov 2023 19:05:17 +0100 Subject: [PATCH] migrate back to gitea actions --- .gitea/workflows/amd64-image.yml | 34 +++++++++++++++++++++++++++++ .github/workflows/oci-image.yml | 37 -------------------------------- 2 files changed, 34 insertions(+), 37 deletions(-) create mode 100644 .gitea/workflows/amd64-image.yml delete mode 100644 .github/workflows/oci-image.yml diff --git a/.gitea/workflows/amd64-image.yml b/.gitea/workflows/amd64-image.yml new file mode 100644 index 0000000..fe4e51b --- /dev/null +++ b/.gitea/workflows/amd64-image.yml @@ -0,0 +1,34 @@ +name: Build neovim image +run-name: Build Neovim image yay +on: + push: + branches: [ "main" ] + schedule: + - cron: '30 3 */3 * *' + +jobs: + build-neovim: + runs-on: ubuntu-latest + steps: + - name: install actions deps + run: | + dnf install -y nodejs git + - name: Check out repository code + uses: actions/checkout@v3 + - run: podman build . --file Dockerfile --tag neovim:latest + - name: build image + run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud + - name: Push image + run: | + IMAGE_NAME="neovim" + IMAGE_ID="gitea.maciej.cloud/packages/$IMAGE_NAME" + podman tag $IMAGE_NAME:latest $IMAGE_ID:latest + podman pull $IMAGE_ID:v1 + podman pull $IMAGE_ID:v2 + podman tag $IMAGE_ID:v2 $IMAGE_ID:v3 + podman tag $IMAGE_ID:v1 $IMAGE_ID:v2 + podman tag $IMAGE_ID:latest $IMAGE_ID:v1 + podman push $IMAGE_ID:latest + podman push $IMAGE_ID:v1 + podman push $IMAGE_ID:v2 + podman push $IMAGE_ID:v3 diff --git a/.github/workflows/oci-image.yml b/.github/workflows/oci-image.yml deleted file mode 100644 index 9014c6c..0000000 --- a/.github/workflows/oci-image.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build neovim image -run-name: Build Neovim image yay -on: - push: - branches: [ "main" ] - schedule: - - cron: '30 3 */5 * *' - -jobs: - build-neovim: - runs-on: ubuntu-latest - steps: - - name: Check out repository code - uses: actions/checkout@v3 - - run: docker build . --file Dockerfile --tag neovim:latest - - name: upload image - #env: - #PACKAGES_USERNAME: ${{ secrets.PACKAGES_USERNAME }} - #PACKAGES_PASSWD: ${{ secrets.PACKAGES_PASSWD }} - run: docker login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud - #- run: docker push gitea.maciej.cloud/packages/neovim - - name: Push image - run: | - IMAGE_NAME="neovim" - IMAGE_ID="gitea.maciej.cloud/packages/$IMAGE_NAME" - docker tag $IMAGE_NAME:latest $IMAGE_ID:latest - docker pull $IMAGE_ID:v1 - docker pull $IMAGE_ID:v2 - docker tag $IMAGE_ID:v2 $IMAGE_ID:v3 - docker tag $IMAGE_ID:v1 $IMAGE_ID:v2 - docker tag $IMAGE_ID:latest $IMAGE_ID:v1 - docker push $IMAGE_ID:latest - docker push $IMAGE_ID:v1 - docker push $IMAGE_ID:v2 - docker push $IMAGE_ID:v3 - -