Skip to content

Commit

Permalink
Formatting of GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
myme committed Apr 26, 2024
1 parent d96eb4b commit 9639298
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,34 @@ name: "Build & Push to Docker Hub"

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

env:
tarball_name: rtcp.tar.gz

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: myme
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build Docker image
run: nix build -o ${{ env.tarball_name }}
- name: Archive Docker Image
uses: actions/upload-artifact@v3
with:
name: docker-image
path: ${{ env.tarball_name }}
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: myme
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build Docker image
run: nix build -o ${{ env.tarball_name }}
- name: Archive Docker Image
uses: actions/upload-artifact@v3
with:
name: docker-image
path: ${{ env.tarball_name }}

push:
needs: [build]
runs-on: ubuntu-latest
Expand All @@ -38,14 +39,12 @@ jobs:
uses: actions/download-artifact@v3
with:
name: docker-image
-
name: Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
name: Push image to Docker Hub
- name: Push image to Docker Hub
run: |
docker load < ${{ env.tarball_name }}
docker tag rtcp:latest myme/rtcp:latest
Expand Down

0 comments on commit 9639298

Please sign in to comment.