Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/docs/certifi-2024.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Tjzabel authored Nov 19, 2024
2 parents 9b1fed3 + 1835aff commit d92c002
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 75 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/go.yml

This file was deleted.

61 changes: 19 additions & 42 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,31 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build and Test TeleIRC

name: Docker

on:
push:
branches: [main]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
on: [push]

# Cancel job in favor of newer commit
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: go-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-push-image:
name: Build and Push Image

build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
go-version: [ '1.18', '1.19', '1.20' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build TeleIRC
run: ./build_binary.sh

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
push: true
context: .
file: ./deployments/container/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Test
run: go test -v ./...
49 changes: 49 additions & 0 deletions .github/workflows/publish_docker_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Push Docker Image

on:
push:
branches: [main]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

concurrency:
group: teleirc-docker-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-push-image:
name: Build and Push Image

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
push: true
context: .
file: ./deployments/container/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
urllib3==1.26.5
urllib3==1.26.19

0 comments on commit d92c002

Please sign in to comment.