Skip to content

Commit

Permalink
revert: Docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Lissy93 authored Jun 9, 2024
1 parent 6773e61 commit f0ec686
Showing 1 changed file with 9 additions and 32 deletions.
41 changes: 9 additions & 32 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: 🐳 Publish Docker Image
name: 🐳 Build + Publish Docker Image

on:
workflow_dispatch:
push:
branches:
- main
- master
tags:
- '*'
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit f0ec686

Please sign in to comment.