From f0ec686f2387e1a6cd89e810d4379a1a7b3bc3fd Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 9 Jun 2024 16:47:51 +0100 Subject: [PATCH] revert: Docker workflow --- .github/workflows/docker.yml | 41 ++++++++---------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e3338c6f..53dcead8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,10 +1,9 @@ -name: 🐳 Publish Docker Image +name: 🐳 Build + Publish Docker Image on: workflow_dispatch: push: branches: - - main - master tags: - '*' @@ -25,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: Extract tag name 🏷️ shell: bash @@ -34,36 +33,36 @@ jobs: - name: Compute tags 🔖 id: compute-tags run: | - if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then + if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then echo "GHCR_TAG=${GHCR_REGISTRY}/${DOCKER_USER}/${IMAGE_NAME}:latest" >> $GITHUB_ENV echo "DOCKERHUB_TAG=${DOCKERHUB_REGISTRY}/${DOCKER_USER}/${IMAGE_NAME}:latest" >> $GITHUB_ENV - elif [[ "${{ github.ref }}" == refs/tags/* ]]; then + else echo "GHCR_TAG=${GHCR_REGISTRY}/${DOCKER_USER}/${IMAGE_NAME}:${GIT_TAG}" >> $GITHUB_ENV echo "DOCKERHUB_TAG=${DOCKERHUB_REGISTRY}/${DOCKER_USER}/${IMAGE_NAME}:${GIT_TAG}" >> $GITHUB_ENV fi - name: Set up QEMU 🐧 - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx 🐳 - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v1 - name: Login to GitHub Container Registry 🔑 - uses: docker/login-action@v3 + uses: docker/login-action@v1 with: registry: ${{ env.GHCR_REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Login to DockerHub 🔑 - uses: docker/login-action@v3 + uses: docker/login-action@v1 with: registry: ${{ env.DOCKERHUB_REGISTRY }} username: ${{ env.DOCKER_USER }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Build and push Docker images 🛠️ - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v2 with: context: . file: ./Dockerfile @@ -72,25 +71,3 @@ jobs: tags: | ${{ env.GHCR_TAG }} ${{ env.DOCKERHUB_TAG }} - - - name: 🗂️ Make Docker Meta - id: meta - uses: docker/metadata-action@v3 - with: - images: | - ${{ env.DOCKERHUB_REGISTRY }}/${{ env.DOCKER_USER }}/${{ env.IMAGE_NAME }} - ${{ env.GHCR_REGISTRY }}/${{ env.DOCKER_USER }}/${{ env.IMAGE_NAME }} - tags: | - type=ref,event=tag - type=semver,pattern={{version}},enable=true - type=semver,pattern={{major}}.x - type=raw,value=latest - flavor: | - latest=false - labels: | - maintainer=Lissy93 - org.opencontainers.image.title=Web Check - org.opencontainers.image.description=Xray Vision for any Website - org.opencontainers.image.documentation=https://web-check.xyz - org.opencontainers.image.authors=Alicia Sykes - org.opencontainers.image.licenses=MIT