diff --git a/.gitea/workflows/oci-image.yml b/.gitea/workflows/oci-image.yml deleted file mode 100644 index 89bf679..0000000 --- a/.gitea/workflows/oci-image.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: - push: - branches: [ "main" ] - schedule: - - cron: '30 12 */3 * *' - -jobs: - Explore-Gitea-Actions: - runs-on: ubuntu-latest - steps: - - run: dnf install -y nodejs git - - name: Check out repository code - uses: actions/checkout@v3 - - run: podman build -t gitea.maciej.cloud/packages/neovim . - - run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud - - run: podman push gitea.maciej.cloud/packages/neovim diff --git a/.github/workflows/oci-image.yml b/.github/workflows/oci-image.yml new file mode 100644 index 0000000..e954e83 --- /dev/null +++ b/.github/workflows/oci-image.yml @@ -0,0 +1,29 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: + push: + branches: [ "main" ] + schedule: + - cron: '30 6 */3 * *' + +jobs: + Explore-Gitea-Actions: + 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" + TAG=$(date +"%Y-%m-%d") + docker tag $IMAGE_NAME:latest $IMAGE_ID:latest + docker push $IMAGE_ID:latest + docker tag $IMAGE_ID:latest $IMAGE_ID:$TAG