From a23dfee2e3f79fdf9d88791bc90b3d35a97f2a88 Mon Sep 17 00:00:00 2001 From: Th0rn0 Date: Sun, 24 Mar 2024 15:57:12 +0000 Subject: [PATCH] workflow update --- .github/workflows/docker-image.yml | 29 +++++++++++++++++++++++------ .github/workflows/go.yml | 28 ---------------------------- 2 files changed, 23 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d657a63..a5d5c0f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,10 +1,10 @@ -name: Docker Image CI +name: Build Docker Image on: push: branches: [ "main" ] - pull_request: - branches: [ "main" ] + # pull_request: + # branches: [ "main" ] jobs: @@ -13,6 +13,23 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) + - + name: Checkout + uses: actions/checkout@v4 + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/lanops-discord-bot:$(date +%s) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 925866c..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go - -name: Go - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.20' - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./...