-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
ci.yml
to use devcontainers/[email protected]
- Loading branch information
Showing
1 changed file
with
28 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,39 @@ | ||
name: CI | ||
|
||
name: 'build' | ||
on: | ||
# pull_request: | ||
push: | ||
branches: [ main ] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup .env file | ||
run: | | ||
cp .devcontainer/.env.example .devcontainer/.env | ||
sed -i "s/your_atcoder_username_here/${{ secrets.ATCODER_USERNAME }}/g" .devcontainer/.env | ||
sed -i "s/your_atcoder_password_here/${{ secrets.ATCODER_PASSWORD }}/g" .devcontainer/.env | ||
- name: Checkout (GitHub) | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Devcontainer Docker Image | ||
run: docker build .devcontainer -t atcoder-rust-devcontainer:test | ||
- name: Setup .env file | ||
run: | | ||
cp .devcontainer/.env.example .devcontainer/.env | ||
sed -i "s/your_atcoder_username_here/${{ secrets.ATCODER_USERNAME }}/g" .devcontainer/.env | ||
sed -i "s/your_atcoder_password_here/${{ secrets.ATCODER_PASSWORD }}/g" .devcontainer/.env | ||
- name: Execute initialization scripts | ||
run: docker run --rm atcoder-rust-devcontainer:test | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Test cargo_compete_new.sh | ||
run: docker run --rm atcoder-rust-devcontainer:test cargo_compete_new.sh abc317 | ||
- name: Build and run Dev Container task | ||
uses: devcontainers/[email protected] | ||
with: | ||
imageName: ghcr.io/yiwiy9/atcoder-rust-devcontainer | ||
runCmd: | | ||
cargo_compete_new.sh abc317 | ||
cd $WORKSPACE_FOLDER/src/contest/abc317/ | ||
cargo compete test a | ||
cd $WORKSPACE_FOLDER/src/contest/problems/ | ||
cargo compete add abc317_a | ||
cargo compete test abc317_a |