From 53eaecff3874f1f6366849c9082453c408e1b6e2 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Thu, 2 Jan 2025 16:21:13 +0000 Subject: [PATCH] test5 --- .gitea/workflows/release.yml | 43 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 2363175..84a060f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,5 +1,3 @@ -name: Publish Docker Image - on: push: branches: @@ -8,11 +6,8 @@ on: - cron: '@weekly' jobs: - publish: + release: runs-on: ubuntu-latest - permissions: - packages: write - contents: read steps: - name: Update Docker configuration continue-on-error: true @@ -23,7 +18,6 @@ jobs: touch -a /etc/docker/daemon.json echo "DOCKER_OPTS=\"--insecure-registry ${{ vars.PACKAGES_REGISTRY_URL }}\"" >> /etc/default/docker echo "{\"insecure-registries\": [\"${{ vars.PACKAGES_REGISTRY_URL }}\"]}" > /etc/docker/daemon.json - systemctl restart docker - name: Check out repository code uses: actions/checkout@v4.2.2 @@ -31,20 +25,25 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to Gitea Package Registry - uses: docker/login-action@v3 - with: - registry: ${{ vars.PACKAGES_REGISTRY_URL }} - username: ${{ vars.PACKAGES_REGISTRY_USERNAME }} - password: ${{ secrets.PACKAGES_REGISTRY_PASSWORD }} - # - name: Log in to Gitea Package Registry - # run: echo ${{ secrets.PACKAGES_REGISTRY_PASSWORD }} | docker login ${{ vars.PACKAGES_REGISTRY_URL }} -u ${{ vars.PACKAGES_REGISTRY_USERNAME }} --password-stdin + # uses: docker/login-action@v3 + # with: + # registry: ${{ vars.PACKAGES_REGISTRY_URL }} + # username: ${{ vars.PACKAGES_REGISTRY_USERNAME }} + # password: ${{ secrets.PACKAGES_REGISTRY_PASSWORD }} + + - name: Log in to Gitea Package Registry + run: echo ${{ secrets.PACKAGES_REGISTRY_PASSWORD }} | docker login ${{ vars.PACKAGES_REGISTRY_URL }} -u ${{ vars.PACKAGES_REGISTRY_USERNAME }} --password-stdin - - name: Build and push Docker image - id: push - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest + # - name: Build and push Docker image + # uses: docker/build-push-action@v6 + # with: + # context: . + # push: true + # tags: ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest + + - name: Build image + run: docker build -t ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest . + + - name: Push image + run: docker push ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest