Skip to content

Commit

Permalink
Added workflows for docker and github
Browse files Browse the repository at this point in the history
  • Loading branch information
Luois45 committed May 8, 2024
1 parent 32eb89d commit 394fdf0
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/docker-build-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Docker Image - Latest

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: luois45
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: Luois45
password: ${{ secrets.GIT_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
luois45/claim-free-steam-packages:latest
ghcr.io/luois45/claim-free-steam-packages:latest
platforms: linux/amd64, linux/arm64/v8, linux/arm/v7

- name: Update Hub Description
uses: peter-evans/dockerhub-description@v2
with:
username: luois45
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: luois45/claim-free-steam-packages
readme-filepath: ./DockerHub-README.md
46 changes: 46 additions & 0 deletions .github/workflows/docker-build-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Docker Image - Version

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: luois45
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: Luois45
password: ${{ secrets.GIT_TOKEN }}

- name: Extract Version Tag
id: extract_tag
run: echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
luois45/claim-free-steam-packages:${{ env.VERSION_TAG }}
ghcr.io/luois45/claim-free-steam-packages:${{ env.VERSION_TAG }}
platforms: linux/amd64, linux/arm64/v8, linux/arm/v7
2 changes: 2 additions & 0 deletions DockerHub-README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Software for the automated activation of free Steam packages (games, movies, DLC, etc.)
Please have a look of it on my [GitHub](https://github.com/Luois45/claim-free-steam-packages).

0 comments on commit 394fdf0

Please sign in to comment.