diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 305739ad..da42dade 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,37 +1,22 @@ -# This is a basic workflow to help you get started with Actions +name: Deploy Docker -name: CD - -# Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the main branch push: - branches: - - '*' - tags: - - 'v*' pull_request: - branches: - - '*' - - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: docker: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - - - name: Checkout + - name: Checkout repository uses: actions/checkout@v4 - - - name: Docker meta - id: docker_meta + + - name: Docker meta + id: meta uses: docker/metadata-action@v5 with: images: schollz/croc - # generate Docker tags based on the following events/attributes tags: | type=ref,event=branch type=ref,event=pr @@ -39,21 +24,21 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=sha - - - name: Set up QEMU + + - name: Setup QEMU uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx + + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - - name: Login to DockerHub + + - name: Login to DockerHub if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push + + - name: Build and push uses: docker/build-push-action@v6 with: context: .