Skip to content

Commit d68474f

Browse files
authored
Merge pull request #15 from amfoss/develop
release v1
2 parents c657d1c + 321da97 commit d68474f

File tree

15 files changed

+3299
-144
lines changed

15 files changed

+3299
-144
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
target
2+
Dockerfile
3+
.dockerignore
4+
.git
5+
.gitignore
6+
.github
7+
docs

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DISCORD_TOKEN=

.github/workflows/deploy.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/ghcr-deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Inspired from: https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-docker-images
2+
name: Create and publish Docker image to GHCR
3+
4+
# Configures this workflow to run every time a change is pushed to the branch called `release`.
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches: ['main']
9+
10+
jobs:
11+
build-and-push-image:
12+
runs-on: ubuntu-latest
13+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
14+
permissions:
15+
contents: read
16+
packages: write
17+
id-token: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
# Uses the `docker/login-action` action to log in to the Github Container Registry
24+
- name: Log in to the Container registry
25+
uses: docker/login-action@v3
26+
with:
27+
registry: ghcr.io
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
# This step uses `docker/metadata-action` to extract tags and labels that will be applied to the specified image.
32+
# The `id` "meta" allows the output of this step to be referenced in a subsequent step.
33+
# The `images` value provides the base name for the tags and labels.
34+
- name: Extract metadata (tags, labels) for Docker
35+
id: meta
36+
uses: docker/metadata-action@v5
37+
with:
38+
images: ghcr.io/amfoss/amd
39+
tags: |
40+
# set latest tag for master branch
41+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }},priority=2000
42+
type=schedule,pattern={{date 'YYYYMMDD'}}
43+
type=ref,event=tag
44+
type=ref,event=pr
45+
type=sha
46+
47+
# This step uses the `docker/build-push-action` action to build the image. If the build succeeds, it pushes the image to GitHub Packages.
48+
- name: Build and push Docker image
49+
id: push
50+
uses: docker/build-push-action@v6
51+
with:
52+
context: .
53+
push: true
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/shuttle-run.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@
33
debug/
44
target/
55

6-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
7-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
8-
Cargo.lock
9-
106
# These are backup files generated by rustfmt
117
**/*.rs.bk
128

139
# MSVC Windows builds of rustc generate these, which store debugging information
1410
*.pdb
1511

16-
# Shuttle ENV
17-
Secrets.toml
12+
.env

0 commit comments

Comments
 (0)