From d558204e0a8ac956d68fc4f907b042189c583f4b Mon Sep 17 00:00:00 2001 From: Dnny44 Date: Mon, 5 Aug 2024 19:56:45 +0000 Subject: [PATCH] Initial commit --- .gitea/workflows/build.yaml | 18 ++++++++++++++++++ .gitea/workflows/buildDocker.yaml | 31 +++++++++++++++++++++++++++++++ .gitea/workflows/secretsTest.yaml | 16 ++++++++++++++++ .gitignore | 14 ++++++++++++++ Dockerfile | 4 ++++ README.md | 2 ++ 6 files changed, 85 insertions(+) create mode 100644 .gitea/workflows/build.yaml create mode 100644 .gitea/workflows/buildDocker.yaml create mode 100644 .gitea/workflows/secretsTest.yaml create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 README.md diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..760987a --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,18 @@ +name: Gitea Actions Demo +run-name: ${{ github.actor }} is testing out Gitea Actions 🚀 +on: [push] +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/.gitea/workflows/buildDocker.yaml b/.gitea/workflows/buildDocker.yaml new file mode 100644 index 0000000..a34bdb0 --- /dev/null +++ b/.gitea/workflows/buildDocker.yaml @@ -0,0 +1,31 @@ +name: Build and Push Image +on: [ push ] + +jobs: + build: + name: Build and push image + runs-on: ubuntu-latest + container: catthehacker/ubuntu:act-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Registry + uses: docker/login-action@v3 + with: + registry: git.donnymims.com + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: | + git.donnymims.com/dnny44/test-actions:latest \ No newline at end of file diff --git a/.gitea/workflows/secretsTest.yaml b/.gitea/workflows/secretsTest.yaml new file mode 100644 index 0000000..4700fab --- /dev/null +++ b/.gitea/workflows/secretsTest.yaml @@ -0,0 +1,16 @@ +on: push +jobs: + hello-world: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Configure 1Password Service Account + uses: 1password/load-secrets-action/configure@v1 + with: + service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + + - name: Load secret + uses: 1password/load-secrets-action@v1 + env: + SECRET: op://Dev Vault #1/Password/password \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c2b884 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# ---> VisualStudioCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2bc2dab --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +# Basic nginx dockerfile starting with Ubuntu 20.04 +FROM ubuntu:20.04 +RUN apt-get -y update +RUN apt-get -y install nginx \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3724fce --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Test-Actions +