Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/setup-go-5
Browse files Browse the repository at this point in the history
  • Loading branch information
jackstockley89 committed Feb 15, 2024
2 parents 04b1f46 + 6667e1e commit 6bd74a6
Show file tree
Hide file tree
Showing 62 changed files with 20 additions and 2,351 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/auth-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

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

- id: approve_colab_user
name: Check PR user
Expand All @@ -31,7 +31,7 @@ jobs:
run: echo ${{ steps.approve_colab_user.outputs.approve_colab_user }}

- name: Comment on PR if true
uses: actions/github-script@v6
uses: actions/github-script@v7
if: steps.approve_colab_user.outputs.approve_colab_user == 'true'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -49,7 +49,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Comment on PR if false
uses: actions/github-script@v6
uses: actions/github-script@v7
if: steps.approve_colab_user.outputs.approve_colab_user == 'false'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build
run: docker build -t foo .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go-releaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -26,7 +26,7 @@ jobs:
password: ${{ secrets.DOCKER_TOKEN }}

- name: Run GoReleaser for cycling-blog
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v5
if: success() && startsWith(github.ref, 'refs/tags/')
with:
version: latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Go Test
run: |
go test -v main_test.go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/localstack-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Start LocalStack
run: |
# install LocalStack cli and awslocal
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/open-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: list open issues
run: |
list=`gh issue list --json number,title --template \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/po-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

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

- name: Run po-linter
uses: docker://ministryofjustice/cloud-platform-po-linter:latest
Expand All @@ -30,7 +30,7 @@ jobs:
REPO_DIRECTORY: kubectl_deploy

- name: Result
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
summary: "Result:\n${{ steps.po-linter.outputs.po-linter }}"
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: list open pull requests
run: |
list=`hub pr list`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule-shutdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: hashicorp/[email protected]
with:
terraform_version: 1.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule-startup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
terraform-apply:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: hashicorp/[email protected]
with:
terraform_version: 1.0.1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

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

- name: Setup Terraform
uses: hashicorp/[email protected]
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
run: terraform -chdir="infra/EKS" plan -no-color -detailed-exitcode || true

- name: Comment Output onto Pull Request
uses: actions/github-script@v6
uses: actions/github-script@v7
if: github.event_name == 'pull_request' && steps.terraform_plan.outputs.exitcode == 2
env:
WORKSPACE: "terraform\n${{ steps.terraform_workspace.outputs.stdout }}"
Expand Down
61 changes: 3 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,9 @@
<h1 align="center" style="font-family: 'Lucida Sans', Arial, sans-serif"><b>golangwebpage</b></h1>
# golangwebpage

&nbsp;&nbsp;&nbsp;&nbsp;
![GitHub pull-requests](https://img.shields.io/github/issues-pr/jackstockley89/golangwebpage?style=for-the-badge)
![GitHub pull-requests closed](https://img.shields.io/github/issues-pr-closed/jackstockley89/golangwebpage?style=for-the-badge)
![GitHub last-commit](https://img.shields.io/github/last-commit/jackstockley89/golangwebpage?style=for-the-badge)
![GitHub contributors](https://img.shields.io/github/contributors/jackstockley89/golangwebpage?style=for-the-badge)
<br/>

<h2 align="left" style="font-family: 'Lucida Sans', Arial, sans-serif"><b>Actions</b></h2>

[![Pull Request Authentication Check](https://github.com/jackstockley89/golangwebpage/actions/workflows/auth-check.yaml/badge.svg)](https://github.com/jackstockley89/golangwebpage/actions/workflows/auth-check.yaml)
[![Terraform Plan infra/EKS](https://github.com/jackstockley89/golangwebpage/actions/workflows/terraform-plan.yml/badge.svg)](https://github.com/jackstockley89/golangwebpage/actions/workflows/terraform-plan.yml)
[![localstack-action-example](https://github.com/jackstockley89/golangwebpage/actions/workflows/localstack-testing.yml/badge.svg)](https://github.com/jackstockley89/golangwebpage/actions/workflows/localstack-testing.yml)
[![Go Test](https://github.com/jackstockley89/golangwebpage/actions/workflows/go-test.yml/badge.svg)](https://github.com/jackstockley89/golangwebpage/actions/workflows/go-test.yml)

[![Release Go project](https://github.com/jackstockley89/golangwebpage/actions/workflows/go-releaser.yaml/badge.svg)](https://github.com/jackstockley89/golangwebpage/actions/workflows/go-releaser.yaml)
[![Continuous Deployment](https://github.com/jackstockley89/golangwebpage/actions/workflows/cd.yml/badge.svg)](https://github.com/jackstockley89/golangwebpage/actions/workflows/cd.yml)
[![CodeQL](https://github.com/jackstockley89/golangwebpage/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/jackstockley89/golangwebpage/actions/workflows/codeql-analysis.yml)
[![Open Issues](https://github.com/jackstockley89/golangwebpage/actions/workflows/open-issues.yml/badge.svg)](https://github.com/jackstockley89/golangwebpage/actions/workflows/open-issues.yml)
[![Pull Request Checker](https://github.com/jackstockley89/golangwebpage/actions/workflows/pr-checker.yml/badge.svg)](https://github.com/jackstockley89/golangwebpage/actions/workflows/pr-checker.yml)
<br/>

<h2 align="left" style="font-family: 'Lucida Sans', Arial, sans-serif"><b>Prerequisite</b></h2>

---
&nbsp;&nbsp;&nbsp;&nbsp;
![GO](https://img.shields.io/github/go-mod/go-version/jackstockley89/golangwebpage)
![Docker](https://img.shields.io/badge/Docker-v20.10.2-blue)

<br/>

<h2 align="left" style="font-family: 'Lucida Sans', Arial, sans-serif"><b>Overview</b></h2>

---
## Overview
Example of a web server created using GO, running from a Docker container

<br/>

<h2 align="left" style="font-family: 'Lucida Sans', Arial, sans-serif"><b>How to Run in Docker Container</b></h2>

---

## How to Run in Docker Container
From repository firstly have to build the image using the following
```
docker build -t "cycling-blog" .
Expand All @@ -50,21 +13,3 @@ Once the image has completed building, this is now ready to run
```
docker run -d -p 8080:8080 cycling-blog:latest
```

<br/>

<h2 align="left" style="font-family: 'Lucida Sans', Arial, sans-serif"><b>How to Run in Docker Compose</b></h2>

---

The docker-compose.yml contains a volume mounted to the local drive to prevent data lost within the database if shutdown. This would required edit if to be used on local machine.

To run the application with database this can be done using docker compose command. The following command build and start the containers in the background
```
docker-compose up --build -d
```

To stop the application with and database with
```
docker-compose down
```
6 changes: 0 additions & 6 deletions deploy/create-golang-cluster.bash

This file was deleted.

52 changes: 0 additions & 52 deletions deploy/cycling-app.yml

This file was deleted.

51 changes: 0 additions & 51 deletions deploy/cycling-db.yml

This file was deleted.

4 changes: 0 additions & 4 deletions deploy/cycling-namespace.yml

This file was deleted.

25 changes: 0 additions & 25 deletions deploy/cycling-service.yml

This file was deleted.

Loading

0 comments on commit 6bd74a6

Please sign in to comment.