Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing docker-deploy.yml #40

Merged
merged 2 commits into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/build.yml → .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI/CD

on:
push:
Expand Down Expand Up @@ -88,3 +88,21 @@ jobs:
with:
name: pidgtm-${{ matrix.target }}
path: target/${{ matrix.target }}/release/pidgtm

docker-deploy:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: pidgtm-x86_64-unknown-linux-gnu

- name: Build Docker image
run: |
docker build -t pidgtm-user-updater:latest -f Dockerfile-UserUpdater .
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push pidgtm-user-updater:latest
31 changes: 0 additions & 31 deletions .github/workflows/docker-deploy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ where
&s.event.tournament.as_ref().unwrap().name,
s.event.tournament.as_ref().unwrap().endAt,
player.id,
get_placement(player.id, &s),
get_placement(&s, player.id),
s.event.numEntrants.unwrap(),
get_seed(requester_entrant_id, &s),
format!("https://www.start.gg/{}", s.event.slug.as_ref().unwrap()).as_str(),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/tournament.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn get_standing_of_player_from_sggset(s: &SGGSet, player_id: i32) -> Standing {
}
}

pub fn get_placement(player_id: i32, s: &SGGSet) -> i32 {
pub fn get_placement(s: &SGGSet, player_id: i32) -> i32 {
let standing = get_standing_of_player_from_sggset(s, player_id);
standing.placement.unwrap()
}
Expand Down
Loading