Bump the github-actions group with 3 updates (#58) #217
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
name: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: null | |
schedule: | |
- cron: "0 6 * * SUN" # Once weekly on Sunday @ 0600 UTC | |
workflow_dispatch: null | |
concurrency: | |
group: ${{ github.workflow }} | |
jobs: | |
tests: | |
name: tests | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4 | |
with: | |
python-version: "3.11" | |
channels: conda-forge | |
channel-priority: strict | |
show-channel-urls: true | |
miniforge-version: latest | |
environment-file: environment.yml | |
- name: configure conda and install code | |
shell: bash -el {0} | |
run: | | |
conda info -a | |
conda install pytest conda-smithy | |
pip install --no-deps -e . | |
- name: lint and run tests | |
shell: bash -el {0} | |
run: | | |
pytest -vv conda_forge_automerge_action | |
command -v run-automerge-action | |
- name: generate token | |
id: generate_token | |
uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4 # v1 | |
with: | |
app-id: ${{ secrets.CF_CURATOR_APP_ID }} | |
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }} | |
owner: ${{ github.repository_owner }} | |
- name: run live tests | |
shell: bash -el {0} | |
run: | | |
echo "${DH_PASSWORD}" | docker login -u condaforgebot --password-stdin | |
git config --global user.name "conda-forge-admin" | |
git config --global user.email "[email protected]" | |
git config --global pull.rebase false | |
python live_tests/run_automerge_live_tests.py --build-and-push | |
env: | |
GHA_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
GH_TOKEN: ${{ steps.generate_token.outputs.token }} | |
DH_PASSWORD: ${{ secrets.CF_BOT_DH_PASSWORD }} | |
docker-push: | |
name: docker-push | |
runs-on: "ubuntu-latest" | |
needs: tests | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
username: condaforgebot | |
password: ${{ secrets.CF_BOT_DH_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 | |
with: | |
push: true | |
tags: condaforge/automerge-action:prod | |
- name: Push README to Dockerhub | |
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1 | |
env: | |
DOCKER_USER: condaforgebot | |
DOCKER_PASS: ${{ secrets.CF_BOT_DH_PASSWORD }} | |
with: | |
destination_container_repo: condaforge/automerge-action:prod | |
provider: dockerhub | |
short_description: "conda-forge image used to power the bot automerge GitHub Actions integration" | |
readme_file: "Dockerfile_README.md" |